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. 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 { diff --git a/index.html b/index.html index 4116667..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

@@ -112,7 +112,10 @@

Select your sources

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

Minimum score

+ 1

Past Shows

  • diff --git a/js/get-video.js b/js/get-video.js index a0edc5c..8f97893 100644 --- a/js/get-video.js +++ b/js/get-video.js @@ -1,8 +1,18 @@ //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) +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) { @@ -48,7 +58,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; @@ -131,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);