Last active
September 13, 2015 19:52
-
-
Save kxc0re/a8b528113c49d1719edc to your computer and use it in GitHub Desktop.
Solar+ - SolarMovieEnhancer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Solar+ | |
// @namespace kxc0re.net | |
// @version 0.3 | |
// @description Enhances Solarmovies by adding a "next episode" and "next season" link to TV shows, cleans up video pages, and has a setting to automatically load links to a certain site. e.g. thevideo.me. | |
// @author kxc0re | |
// @include http*://*.solarmovie.* | |
// @resource css https://gist.github.com/kxc0re/a8b528113c49d1719edc/raw/41e6273122171e5491b9f652234653b18f5d3f66/solar+style.css | |
// @resource sbar https://gist.github.com/kxc0re/a8b528113c49d1719edc/raw/41e6273122171e5491b9f652234653b18f5d3f66/solar+html.html | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js | |
// @grant GM_addStyle | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// @grant GM_getResourceText | |
// ==/UserScript== | |
$(document).ready(function() { | |
//Adding HTML and CSS | |
//---- | |
var sbar = GM_getResourceText("sbar"); | |
var SettingsHTML = document.createElement('div'); | |
SettingsHTML.innerHTML = sbar; | |
var style = GM_getResourceText("css"); | |
document.body.appendChild(SettingsHTML); | |
GM_addStyle(style); | |
//Script Functions | |
//---- | |
var SiteToLoad = GM_getValue("SiteToLoad", "manually pick site"); | |
$("#VideoSiteDropDown option").filter(function() { | |
//may want to use $.trim in here | |
return $(this).text() == SiteToLoad; | |
}).prop('selected', true); | |
$("#VideoSiteDropDown").change(function() { | |
GM_setValue("SiteToLoad", this.value); | |
}); | |
//Converts show links into direct play links | |
$('a').each(function() { | |
this.href = this.href.replace('link/show', 'link/play'); | |
}); | |
//Auto click video site links if found | |
$(function() { | |
if (document.location.href.indexOf('/tv/') > -1 || document.location.href.indexOf('/watch') > -1) { | |
var SiteToLoad = GM_getValue("SiteToLoad", "manually pick site"); | |
var TargetSite = $('a:contains("' + SiteToLoad + '")').length; | |
if (TargetSite > 0) { | |
window.location = $('a:contains("' + SiteToLoad + '")').attr('href'); | |
} | |
} | |
}); | |
$(function() { | |
if (document.location.href.indexOf('/tv/') > -1) { | |
//adds next episode and season to links page | |
var id = window.location.href; | |
id = id.replace(/episode-(\d+)/, function(match, number) { | |
return 'episode-' + (parseInt(number, 10) + 1); | |
}); | |
var season = window.location.href; | |
season = season.replace(/season-(\d+)/, function(match, number) { | |
return 'season-' + (parseInt(number, 10) + 1); | |
}); | |
season = season.replace(/episode-(\d+)/, function(match, number) { | |
return 'episode-1'; | |
}); | |
$(".season_episode").append("</br></br><a href=\"" + id + "\"><div id=\"NextE\" class=\"btn\">Next Episode</div></a> <a href=\"" + season + "\"><div id=\"NextS\" class=\"btn\">Next Season</div></a>"); | |
//css and removing elements | |
$(".frameWrapper").css("height", "70px"); | |
$(".ratingsWrapper").remove(); | |
$(".reportabug").remove(); | |
$(".SearchesBlock").remove(); | |
$(".partnerButton").remove(); | |
} | |
}); | |
$(function() { | |
if (document.location.href.indexOf('/play') > -1) { | |
$('span').text(""); | |
//only run if it's TV show | |
$('a[href*="/tv/"]').each(function() { | |
var season = $('a[href*="/tv/"]').attr('href'); | |
var episode = $('a[href*="/tv/"]').attr('href'); | |
season = season.replace(/season-(\d+)/, function(match, number) { | |
return 'season-' + (parseInt(number, 10) + 1); | |
}); | |
season = season.replace(/episode-(\d+)/, function(match, number) { | |
return 'episode-1'; | |
}); | |
episode = episode.replace(/episode-(\d+)/, function(match, number) { | |
return 'episode-' + (parseInt(number, 10) + 1); | |
}); | |
$('.js-link-like-result').append("<a href=\"" + episode + "\"><div id=\"NextE\" class=\"btn\">Next Episode</div></a> <a href=\"" + season + "\"><div id=\"NextS\" class=\"btn\">Next Season</div></a>"); | |
}); | |
//adds next episode and next season to video page | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="SBar"> | |
<h1 id="SettingsHeader1">Solar+<h1> | |
<div id=VideoSiteSettings> | |
<select id="VideoSiteDropDown"> | |
<option>manually pick site</option> | |
<option>4streaming.net</option> | |
<option>allmyvideos.net</option> | |
<option>clicktoview.org</option> | |
<option>cloudzilla.to</option> | |
<option>divxstage.to</option> | |
<option>filenuke.com</option> | |
<option>ishared.eu</option> | |
<option>mk-tube.com</option> | |
<option>moveshare.new</option> | |
<option>nosvideo.com</option> | |
<option>nowvideo.sx</option> | |
<option>played.to</option> | |
<option>putstream.com</option> | |
<option>realvid.net</option> | |
<option>sharesix.com</option> | |
<option>streamin.to</option> | |
<option>thefile.me</option> | |
<option>thevideo.me</option> | |
<option>vidbull.com</option> | |
<option>vidplay.net</option> | |
<option>vodlocker.com</option> | |
<option>wavymotion.com</option> | |
</select> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Hide { | |
display: none !important; | |
} | |
.headerpage { | |
padding-top: 30px; | |
} | |
#SBar { | |
background-color: rgba(0, 0, 0, 0.85); | |
color: #eee; | |
height: 30px; | |
position: fixed; | |
top: 0; | |
width: 100%; | |
} | |
#VideoSiteDropDown { | |
background-color: #111; | |
border: 0 none; | |
color: white; | |
position: fixed; | |
right: 10px; | |
top: 3px; | |
z-index: 99999999; | |
} | |
#SettingsHeader1 { | |
padding-left: 20px; | |
} | |
.frameWrapper { | |
background-color: transparent !important; | |
} | |
.wrapper, .frameWrapper { | |
background: rgba(0, 0, 0, 0) none repeat scroll 0 0 !important; | |
} | |
.frameWrapper { | |
width: 90% !important; | |
} | |
#footer, .ratingsWrapper, .partnerButton, .favoriteButton, .unFavoriteButton span, .workOrNot, .worklink.unFavoriteButton { | |
display: none !important; | |
} | |
.wrapper h1 { | |
font-size: 16px !important; | |
margin: 6px 100px 20px !important; | |
padding: 0 !important; | |
} | |
.countSaidGood { | |
color: white !important; | |
position: absolute !important; | |
right: 0 !important; | |
top: 3px !important; | |
} | |
.btn { | |
background-image: linear-gradient(to top, #111, #242424); | |
border-width: 1px; | |
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05); | |
color: white; | |
text-decoration: none; | |
text-shadow: none; | |
cursor: pointer; | |
display: inline-block; | |
font-size: 12px; | |
margin-bottom: 3px; | |
margin-right: 10px; | |
padding: 5px 10px; | |
text-align: center; | |
vertical-align: middle; | |
} | |
.btn:hover { | |
background-image: linear-gradient(to bottom, #111, #242424 ); | |
color: white; | |
text-decoration: none | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment