mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
parent
1e8553dd01
commit
34f8050fb7
4 changed files with 23 additions and 3 deletions
|
@ -148,7 +148,12 @@
|
|||
);
|
||||
const documentWrite = documentWriteDescriptor.value;
|
||||
documentWriteDescriptor.value = exportFunction(function write(str){
|
||||
const parts = str.split(/(?=<)/);
|
||||
str = "" + str;
|
||||
// weird problem with waterfox and google docs
|
||||
const parts = (
|
||||
str.match(/^\s*<!doctype/i) &&
|
||||
!str.match(/frame/i)
|
||||
)? [str]: str.split(/(?=<)/);
|
||||
const length = parts.length;
|
||||
const scripts = window.document.getElementsByTagName("script");
|
||||
for (let i = 0; i < length; i += 1){
|
||||
|
@ -170,6 +175,7 @@
|
|||
);
|
||||
const documentWriteln = documentWritelnDescriptor.value;
|
||||
documentWritelnDescriptor.value = exportFunction(function writeln(str){
|
||||
str = "" + str;
|
||||
const parts = str.split(/(?=<)/);
|
||||
const length = parts.length - 1;
|
||||
const scripts = window.document.getElementsByTagName("script");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue