Skip to content

Commit 8b324d5

Browse files
authored
Merge pull request #1260 from NotAProton/tii
2 parents f4c8bdb + 72bf907 commit 8b324d5

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

src/bypasses/blogtech.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import BypassDefinition from './BypassDefinition.js';
2+
3+
export default class BlogTechh extends BypassDefinition {
4+
constructor() {
5+
super();
6+
}
7+
8+
execute() {
9+
this.helpers.awaitElement("button#getlink", button => {
10+
button.click()
11+
})
12+
}
13+
}
14+
15+
export const matches = ['blogtechh.com', 'oko.sh'];

src/bypasses/tii.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import BypassDefinition from './BypassDefinition.js';
2+
3+
export default class TiiLa extends BypassDefinition {
4+
constructor() {
5+
super();
6+
this.ensure_dom = true;
7+
}
8+
9+
execute() {
10+
const urlObj = new URL(window.location.href)
11+
this.helpers.crowdQuery('tii.la', urlObj.pathname.slice(1)).then((dest) => {
12+
this.helpers.crowdNavigate(dest)
13+
});
14+
/*keep checking for the button*/
15+
setInterval(() => {
16+
const button = document.querySelector("a.btn.btn-success.btn-lg.get-link");
17+
if (button && button.href) {
18+
this.helpers.crowdContribute('tii.la', urlObj.pathname.slice(1), button.href)
19+
this.helpers.safelyNavigate(button.href)
20+
}
21+
}, 500);
22+
23+
}
24+
}
25+
26+
export const matches = ['tii.la'];

src/helpers/dom.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export function crowdQuery(domain, path) {
247247
return new Promise((resolve, reject) => {
248248
const timeout = setTimeout(() => {
249249
reject(new Error('Timeout: crowd response not received'));
250-
}, 5000); //5 sec timeout
250+
}, 10000); //10 sec timeout
251251

252252
document.addEventListener('ff53054c0e13_crowdResponse', function (event) {
253253
clearTimeout(timeout);
@@ -443,6 +443,13 @@ export async function bypassRequests(execution_method) {
443443
return Promise.resolve(result);
444444
};
445445
}
446+
/**
447+
* Navigates to the specified URL. To be used for crowd sourced bypasses.
448+
* @param {string} target - The target URL to navigate to.
449+
*/
450+
export function crowdNavigate(target) {
451+
unsafelyNavigate(target, null, true);
452+
}
446453

447454
export default {
448455
insertInfoBox,
@@ -451,6 +458,7 @@ export default {
451458
ffclipboard,
452459
crowdQuery,
453460
crowdContribute,
461+
crowdNavigate,
454462
followAndContribute,
455463
unsafelyNavigate,
456464
parseTarget,

0 commit comments

Comments
 (0)