File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ export default class TiiLa extends BypassDefinition {
9
9
execute ( ) {
10
10
const urlObj = new URL ( window . location . href )
11
11
this . helpers . crowdQuery ( 'tii.la' , urlObj . pathname . slice ( 1 ) ) . then ( ( dest ) => {
12
- this . helpers . crowdNavigate ( dest ) ;
12
+ this . helpers . crowdNavigate ( dest )
13
13
} ) ;
14
14
/*keep checking for the button*/
15
- setInterval ( ( ) => {
15
+ setInterval ( ( ) => {
16
16
const button = document . querySelector ( "a.btn.btn-success.btn-lg.get-link" ) ;
17
- if ( button . href ) {
17
+ if ( button && button . href ) {
18
18
this . helpers . crowdContribute ( 'tii.la' , urlObj . pathname . slice ( 1 ) , button . href )
19
19
this . helpers . safelyNavigate ( button . href )
20
20
}
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ export function crowdQuery(domain, path) {
247
247
return new Promise ( ( resolve , reject ) => {
248
248
const timeout = setTimeout ( ( ) => {
249
249
reject ( new Error ( 'Timeout: crowd response not received' ) ) ;
250
- } , 5000 ) ; //5 sec timeout
250
+ } , 10000 ) ; //10 sec timeout
251
251
252
252
document . addEventListener ( 'ff53054c0e13_crowdResponse' , function ( event ) {
253
253
clearTimeout ( timeout ) ;
@@ -443,6 +443,13 @@ export async function bypassRequests(execution_method) {
443
443
return Promise . resolve ( result ) ;
444
444
} ;
445
445
}
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
+ }
446
453
447
454
export default {
448
455
insertInfoBox,
@@ -451,6 +458,7 @@ export default {
451
458
ffclipboard,
452
459
crowdQuery,
453
460
crowdContribute,
461
+ crowdNavigate,
454
462
followAndContribute,
455
463
unsafelyNavigate,
456
464
parseTarget,
You can’t perform that action at this time.
0 commit comments