Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
2 changes: 2 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ h3{
.contents .left,
.contents .right {
font-size: .85vw;
overflow-y: auto;
}
p {
margin: 0 0 .5vw 0;
Expand Down Expand Up @@ -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 {
Expand Down
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<div class="left">
<p>Originally developed by <a href="https://mrmcpowned.com">Mr McPowned</a> (source on <a href="https://github.com/mrmcpowned/interdimensionalcable">on github</a>). Also <a href="http://gravypod.com">this guy</a> helped.</p>
<p>Original idea by <a href="https://steamcommunity.com/id/2Mill/">this guy</a>.</p>
<p>This version was tweaked by <a href="https://github.com/topotech/">this guy</a>.</p>
<p>This version was tweaked by <a href="https://github.com/topotech/">this guy</a>, with a couple of features by <a href="https://github.com/williambl">This guy</a>.</p>
</div>
<div class="right">
<h2>Menu</h2>
Expand All @@ -112,7 +112,10 @@ <h3>Select your sources</h3>
<input type="checkbox" id="NTE">/r/NotTimAndEric<br>
<input type="checkbox" id="ACI">/r/ACIDS<br>
<input type="checkbox" id="FWV">/r/fifthworldvideos<br>
<input type="checkbox" id="IBG">/r/IllBeYourGuide
<input type="checkbox" id="IBG">/r/IllBeYourGuide<br>
<input type="checkbox" id="CMC">/r/CommercialCuts
<h3>Minimum score</h3>
<input type="range" min="0" max="1000" value="1" class="slider" id="min_score"><span id="score_preview">1</span>
<h3>Past Shows</h3>
<div id="list-template">
<li>
Expand Down
17 changes: 14 additions & 3 deletions js/get-video.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down