Skip to content

Instantly share code, notes, and snippets.

@ijash
Created March 24, 2021 18:40
Show Gist options
  • Save ijash/b2c7275e691267cab9474dd8e2e29828 to your computer and use it in GitHub Desktop.
Save ijash/b2c7275e691267cab9474dd8e2e29828 to your computer and use it in GitHub Desktop.
/**
* dbepisodes.com open many tabs.
* open new tab(empty tab)>developer console(f12)>paste codes
* www.github.com/ijash
*/
let latestEpisode = parseInt(prompt('enter start episode', 145));
let countEp = 0;
if (openInNewTab !== undefined) {
function openInNewTab(targetDbUrl) {
let currentWindow = window.open(targetDbUrl, '_blank');
currentWindow.focus();
};
} else {
openInNewTab = function (targetDbUrl) {
let win = window.open(targetDbUrl, '_blank');
win.focus();
};
};
for (let i = latestEpisode; i < (latestEpisode+20); i++) {
let targetLink = `https://dbepisodes.com/episodes/dragon-ball-z-episode-${i}-subbed-in-english-online-free-watch/`;
openInNewTab(targetLink);
countEp++;
};
console.log(`${countEp} episodes remaining`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment