File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 723
723
} ) ( ) ;
724
724
725
725
726
+ /// refresh-defuser.js
727
+ // https://www.reddit.com/r/uBlockOrigin/comments/q0frv0/while_reading_a_sports_article_i_was_redirected/hf7wo9v/
728
+ ( function ( ) {
729
+ const arg1 = '{{1}}' ;
730
+ const defuse = ( ) => {
731
+ const meta = document . querySelector ( 'meta[http-equiv="refresh" i][content]' ) ;
732
+ if ( meta === null ) { return ; }
733
+ const s = arg1 === '' || arg1 === '{{1}}'
734
+ ? meta . getAttribute ( 'content' )
735
+ : arg1 ;
736
+ const ms = Math . max ( parseFloat ( s ) || 0 , 0 ) * 1000 ;
737
+ setTimeout ( ( ) => { window . stop ( ) ; } , ms ) ;
738
+ } ;
739
+ if ( document . readyState === 'loading' ) {
740
+ document . addEventListener ( 'DOMContentLoaded' , defuse , { once : true } ) ;
741
+ } else {
742
+ defuse ( ) ;
743
+ }
744
+ } ) ( ) ;
745
+
746
+
726
747
/// remove-attr.js
727
748
/// alias ra.js
728
749
( function ( ) {
You can’t perform that action at this time.
0 commit comments