Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Scriptlets should handle escaped quotes correctly #286

@maximtop

Description

@maximtop

These pairs should work the same way

rules pair

#%#//scriptlet("prevent-setTimeout", ".css('display','block');")

#%#//scriptlet('prevent-setTimeout', '.css(\'display\',\'block\');')

should block setTimeout with stringified callback containing the next substring:

.css('display','block');

and pair

#%#//scriptlet("prevent-setTimeout", ".css(\"display\",\"block\");")

#%#//scriptlet('prevent-setTimeout', '.css("display","block");')

should block setTimeout with stringified callback containing the next substring

.css("display","block");

How to check if they work

  1. add a rule #%#//scriptlet('prevent-setTimeout', '.css(\'display\',\'block\');')
  2. go to any site, run in the console
setTimeout(() => { console.log(`.css('display','block');`)}, 500);

set timeout should not be executed

after that

  1. add a rule #%#//scriptlet('prevent-setTimeout', ".css('display','block');")
  2. go to any site, run in the console
setTimeout(() => { console.log(`.css('display','block');`)}, 500);

set timeout should not be executed

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions