Skip to content

Commit

Permalink
Rewrite to WebExtensions API (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloyan-raev authored Feb 18, 2018
1 parent a7fd784 commit ec96861
Show file tree
Hide file tree
Showing 50 changed files with 694 additions and 1,482 deletions.
17 changes: 17 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
browser.webRequest.onBeforeSendHeaders.addListener(
onPageLoading,
{ urls: ["<all_urls>"] }
);

function onPageLoading(e) {
if (e.type != "main_frame") {
return;
}

browser.cookies.get({url: e.url, name: "debug_start_session"}).then(cookie => {
if (!cookie) {
resetIcon();
clearDebugCookies(e.url);
}
});
}
4 changes: 0 additions & 4 deletions chrome.manifest

This file was deleted.

90 changes: 90 additions & 0 deletions common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
function resetIcon() {
browser.browserAction.setIcon({path: "icons/debugmenu.gif"});
}

function clearDebugCookies(url) {
browser.cookies.remove({
url: url,
name: "debug_host"
});

browser.cookies.remove({
url: url,
name: "debug_port"
});

browser.cookies.remove({
url: url,
name: "debug_fastfile"
});

browser.cookies.remove({
url: url,
name: "start_debug"
});

browser.cookies.remove({
url: url,
name: "send_debug_header"
});

browser.cookies.remove({
url: url,
name: "send_sess_end"
});

browser.cookies.remove({
url: url,
name: "debug_jit"
});

browser.cookies.remove({
url: url,
name: "debug_stop"
});

browser.cookies.remove({
url: url,
name: "use_remote"
});

browser.cookies.remove({
url: url,
name: "no_remote"
});

browser.cookies.remove({
url: url,
name: "use_ssl"
});

browser.cookies.remove({
url: url,
name: "start_profile"
});

browser.cookies.remove({
url: url,
name: "debug_coverage"
});

browser.cookies.remove({
url: url,
name: "debug_session_id"
});

browser.cookies.remove({
url: url,
name: "debug_start_session"
});

browser.cookies.remove({
url: url,
name: "original_url"
});

browser.cookies.remove({
url: url,
name: "ZendDebuggerCookie"
});
}
46 changes: 0 additions & 46 deletions content/about.css

This file was deleted.

42 changes: 0 additions & 42 deletions content/about.js

This file was deleted.

31 changes: 0 additions & 31 deletions content/about.xul

This file was deleted.

32 changes: 0 additions & 32 deletions content/frames.js

This file was deleted.

24 changes: 0 additions & 24 deletions content/frames.xul

This file was deleted.

Loading

0 comments on commit ec96861

Please sign in to comment.