From 83935cf02203631f3698d46d2562a5195bbc2bf3 Mon Sep 17 00:00:00 2001 From: williambl Date: Sat, 23 Sep 2017 22:19:37 +0100 Subject: [PATCH 1/5] Added support for /r/CommercialCuts --- index.html | 3 ++- js/get-video.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 4116667..adc5823 100644 --- a/index.html +++ b/index.html @@ -112,7 +112,8 @@

Select your sources

/r/NotTimAndEric
/r/ACIDS
/r/fifthworldvideos
- /r/IllBeYourGuide + /r/IllBeYourGuide
+ /r/CommercialCuts

Past Shows

  • diff --git a/js/get-video.js b/js/get-video.js index a0edc5c..1868b5a 100644 --- a/js/get-video.js +++ b/js/get-video.js @@ -1,5 +1,5 @@ //Adding support to different subredits -var tx_subs = ["/r/InterdimensionalCable", "/r/NotTimAndEric", "/r/ACIDS", "/r/fifthworldvideos","/r/IllBeYourGuide"]; +var tx_subs = ["/r/InterdimensionalCable", "/r/NotTimAndEric", "/r/ACIDS", "/r/fifthworldvideos","/r/IllBeYourGuide", "/r/CommercialCuts"]; var len_subs = tx_subs.length; var MAX_REQ = 50; //Max number of links will be requested each JSON call var PROB = 14; //Probability of accepting link (percentage) @@ -48,7 +48,8 @@ $(function () { cb_subs[1] = document.getElementById("NTE"); // Not Tim and Eric cb_subs[2] = document.getElementById("ACI"); // ACIDS cb_subs[3] = document.getElementById("FWV"); // Fifth World Videos - cb_subs[4] = document.getElementById("IBG"); // I'll Be Your Guide + cb_subs[4] = document.getElementById("IBG"); // I'll Be Your Guide + cb_subs[5] = document.getElementById("CMC"); // Commercial Cuts var final_url; var exist_checked = false; From f824977df281a644f2cc3b4d98f6d1ca986116d4 Mon Sep 17 00:00:00 2001 From: williambl Date: Sat, 23 Sep 2017 22:49:31 +0100 Subject: [PATCH 2/5] Added a slider to change minimum post score --- index.html | 2 ++ js/get-video.js | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index adc5823..3cce1fe 100644 --- a/index.html +++ b/index.html @@ -114,6 +114,8 @@

    Select your sources

    /r/fifthworldvideos
    /r/IllBeYourGuide
    /r/CommercialCuts +

    Minimum score

    + 1

    Past Shows

  • diff --git a/js/get-video.js b/js/get-video.js index 1868b5a..8f97893 100644 --- a/js/get-video.js +++ b/js/get-video.js @@ -3,6 +3,16 @@ var tx_subs = ["/r/InterdimensionalCable", "/r/NotTimAndEric", "/r/ACIDS", "/r/f var len_subs = tx_subs.length; var MAX_REQ = 50; //Max number of links will be requested each JSON call var PROB = 14; //Probability of accepting link (percentage) +var min_score = 1; //Minimum score for reddit posts + +var min_score_slider = document.getElementById("min_score"); //Slider for minimum reddit score +var min_score_output = document.getElementById("score_preview"); //Output for minimum reddit score + +// Update the min score & output whenever slider value changes +min_score_slider.oninput = function() { + min_score_output.innerHTML = this.value; + min_score = this.value; +} //Begining of original code if (!Array.prototype.randomElement) { @@ -132,7 +142,7 @@ $(function () { } // Check if a reddit post has less than 1 points. // If the post does, ignore it. It is unworthy. - if (reddit_post_data.score < 1) { + if (reddit_post_data.score < min_score) { return false; } var groups = youtube_video_regex.exec(reddit_post_data.url); From cde2ed5fccc6375043fc2dbabd6a8013e052c351 Mon Sep 17 00:00:00 2001 From: williambl Date: Sat, 23 Sep 2017 23:02:40 +0100 Subject: [PATCH 3/5] Added myself to credits --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 3cce1fe..f6ac284 100644 --- a/index.html +++ b/index.html @@ -102,7 +102,7 @@

    Originally developed by Mr McPowned (source on on github). Also this guy helped.

    Original idea by this guy.

    -

    This version was tweaked by this guy.

    +

    This version was tweaked by this guy, with a couple of features by This guy.

    Menu

    From 80b85e863a06f03f09072742c7e9d66a82190424 Mon Sep 17 00:00:00 2001 From: williambl Date: Sat, 23 Sep 2017 23:12:48 +0100 Subject: [PATCH 4/5] Updated README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ec31177..0b14dcc 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,9 @@ This new version has the following features: > /r/fifthworldvideos, - > /r/IllBeYourGuide. + > /r/IllBeYourGuide, + + > /r/CommercialCuts. If no option is selected, /r/InterdimensionalCable will be used by default. @@ -33,3 +35,5 @@ This new version has the following features: · The code was modified so the site can be slightly more usable in more devices. It was tested on Android Lollipop: it presents buggy behavior but is usable, specially with virtual keyboards like Ivan Volosyuk's "WiFi Keyboard". + + · Added a slider to filter out low-score videos. From b5eeaced4fcd8568aeb85ce97d9004f75f3a7519 Mon Sep 17 00:00:00 2001 From: williambl Date: Tue, 26 Sep 2017 20:29:02 +0100 Subject: [PATCH 5/5] Made menu scrollable --- css/style.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/css/style.css b/css/style.css index 1228a10..e0d28c7 100644 --- a/css/style.css +++ b/css/style.css @@ -70,6 +70,7 @@ h3{ .contents .left, .contents .right { font-size: .85vw; + overflow-y: auto; } p { margin: 0 0 .5vw 0; @@ -386,6 +387,7 @@ html[data-useragent*=Firefox] .menu-overlay #video::before { display: block; color: #FFFFFF; z-index: 3; + overflow: auto; } .tv-menu .left, .tv-menu .right {