Microsoft has acquired GitHub. Decentraleyes has left GitHub. Welcome to its new home!

To participate, please register, or sign in with an existing, Bitbucket, or GitHub account.

Past contributions on GitHub? Be sure to reclaim your Comments, Issues, and Pull Requests.

Commit 52347f11 authored by Alaska's avatar Alaska

Upload New File

parent e2aac58c
function listener(details) { // todo simply return, if attribute 'crossorigin' doesn't appear
let filter = browser.webRequest.filterResponseData(details.requestId);
let decoder = new TextDecoder("utf-8"); // can be reused?
let encoder = new TextEncoder(); // can be reused?
filter.ondata = event => {
let str = decoder.decode(, {
stream : true
//////////////// regex needs work!!!!!!
str = str.replace(/(?!<script .*?)crossorigin(?=.*>)/gi, 'noop'); // todo replace with ''?
return {}; // not needed
listener, {
urls : ["<all_urls>"],
types : ["main_frame"]
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment