/next.js (28d1fa42a634b270b1e3e9fdac892020b3878389) (1415 bytes) (mode 100644) (type blob)
/** This small content script implements a next button.
* it chooses the next episode of the current season or
* or the next season if the last episode but not the last season is reached.
*/
'use strict'
/* get current hoster and try to get next episode from current season */
let hoster = location.href.substring(location.href.lastIndexOf('/'));
let next = $('#episodes li[class*=\'active\']').next();
if (next.length == 0) { /* end of season -> switch to next one */
let nseason = $('#seasons > ul > li[class*=\'active\']').next();
if (nseason.length != 0) { /* luck, not the last season, request next one */
$.ajax({
url: $(nseason).find('a')[0].href,
type: "GET"
}).done(function(response) { /* get the first episode link */
let href = $(response).find('.episodes a')[0] + hoster;
$('ul.hoster-tabs.top').append('<li><a href="' + href + '">Next</a></li>');
});
}
} else { /* there are more episodes in this season */
let href = $(next).find('a').prop('href') + hoster;
$('ul.hoster-tabs.top').append('<li><a href="' + href + '">Next</a></li>');
}
function autoplay() {
console.log('called');
}
/* not implemented */
chrome.storage.sync.get(['autoplay'], function(items) {
if (items.autoplay == true) {
window.addEventListener("playing", function() { console.log('called'); }, true);
}
});
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
1629 |
bbcec55dc995b9dd8cad03e19bb52367e13cb352 |
README.md |
100644 |
blob |
808 |
c77600f9ea887ca032fd7577a74d7864e778dd4a |
background.js |
100644 |
blob |
1498 |
be3245ae446702d46b5cc23d6f3052b689ca3f2c |
favorite.js |
040000 |
tree |
- |
c9aa98d9296dbdb734be5a929b524a2d66a2d97b |
images |
100644 |
blob |
86927 |
4d9b3a258759c53e7bc66b6fc554c51e2434437c |
jquery-3.3.1.js |
100644 |
blob |
1566 |
d0070e77c72e3b6c83babbe8e996bc4925970acd |
manifest.json |
100644 |
blob |
1415 |
28d1fa42a634b270b1e3e9fdac892020b3878389 |
next.js |
100644 |
blob |
1268 |
396658b5d3fc25b0c509b9a8afbf9b07b9b4c68b |
options.html |
100644 |
blob |
5174 |
f83c1c8589bce30795ffe6b097f1cf7d75050d14 |
options.js |
100644 |
blob |
1264 |
19e3b2e975f3a25acacb2737e2aa25b060396f13 |
overlay.js |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/ratzeputz/Bsext
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/ratzeputz/Bsext
Clone this repository using git:
git clone git://git.rocketgit.com/user/ratzeputz/Bsext
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main