Skip to content

Commit 57dcf51

Browse files
authored
Merge pull request #793 from FastForwardTeam/create-the-complete2unlock-and-mydramalist
create the actual bypasses for complete2unlock & mydramalist
2 parents 38d6bdd + 7928f3d commit 57dcf51

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

src/bypasses/complete2unlock.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import BypassDefinition from './BypassDefinition.js';
2+
3+
export default class Complete2unlock extends BypassDefinition {
4+
constructor() {
5+
super();
6+
}
7+
8+
execute() {
9+
debugger;
10+
const timer = setInterval(() => {
11+
const link_success_button = document.getElementById('link-success-button');
12+
if (!link_success_button) return;
13+
14+
const unlock_panels = document.querySelectorAll('.unlockpanel');
15+
16+
if (0 === unlock_panels.length) return;
17+
18+
clearInterval(timer);
19+
// override the window open method, no more annoying popups
20+
window.open = () => {};
21+
22+
unlock_panels.forEach(panel => panel.click());
23+
24+
const is_button_enabled_timer = setInterval(() => {
25+
if (link_success_button.hasAttribute('disabled')) return;
26+
27+
clearInterval(is_button_enabled_timer);
28+
link_success_button.click();
29+
}, 100);
30+
}, 300);
31+
32+
setInterval(() => clearInterval(timer), 30000)
33+
}
34+
}
35+
36+
export const matches = ['complete2unlock.com'];

src/bypasses/mydramalist.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import BypassDefinition from './BypassDefinition.js';
2+
3+
export default class Mydramalist extends BypassDefinition {
4+
constructor() {
5+
super();
6+
7+
}
8+
9+
execute() {
10+
const search_params = location.search;
11+
const decoded_search_params = decodeURIComponent(search_params);
12+
const full_url = decoded_search_params.replace('?q=', '');
13+
this.helpers.safelyNavigate(full_url);
14+
}
15+
}
16+
17+
export const matches = ['mydramalist.com'];

0 commit comments

Comments
 (0)