summaryrefslogtreecommitdiff
path: root/data/extensions/SubmitMe@0xbeef.coffee
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2017-09-01 16:42:12 -0400
committerRuben Rodriguez <ruben@gnu.org>2017-09-01 16:42:12 -0400
commit43d2827eeedaf72acbe8eb4c0853eaae272c49f7 (patch)
tree2bbc6ddf438d900230fe760209dab8b29a09b8dd /data/extensions/SubmitMe@0xbeef.coffee
parent25e19003125673213cbfa15a3adb04b7c6371c4d (diff)
Added extension collection https://addons.mozilla.org/en-US/firefox/collections/NateN1222/librejs-compatibility-add-ons/
Diffstat (limited to 'data/extensions/SubmitMe@0xbeef.coffee')
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/License7
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/META-INF/manifest.mf67
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/META-INF/mozilla.rsabin0 -> 4179 bytes
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/META-INF/mozilla.sf4
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/background.js159
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/icons/16x16.pngbin0 -> 270 bytes
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/icons/16x16_2.pngbin0 -> 271 bytes
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/icons/48x48.pngbin0 -> 628 bytes
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/improve_css.js79
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/manifest.json44
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/manual.js47
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/passive_read_css.js58
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/popup/popup.css7
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/popup/popup.html22
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/popup/popup.js1
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/unhide_css.js34
16 files changed, 529 insertions, 0 deletions
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/License b/data/extensions/SubmitMe@0xbeef.coffee/License
new file mode 100644
index 0000000..b5a65bb
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/License
@@ -0,0 +1,7 @@
+Copyright (C) 2017 Nathan Nichols
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NATHAN NICHOLS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/META-INF/manifest.mf b/data/extensions/SubmitMe@0xbeef.coffee/META-INF/manifest.mf
new file mode 100644
index 0000000..1ccb4fa
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/META-INF/manifest.mf
@@ -0,0 +1,67 @@
+Manifest-Version: 1.0
+
+Name: background.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: yOmX7/EYGE2ebtW7aUDNew==
+SHA1-Digest: FvWWJT+WhZhSelwxj2zC5eFucrU=
+
+Name: improve_css.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: PS8vNsUriICqQ1WeOCUhyA==
+SHA1-Digest: NEWrN1owkMMsfRpgLN5BqEps0Do=
+
+Name: License
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: Gm39a/qnCG3uf9EcuPBVMw==
+SHA1-Digest: RuxC7X//13rkWB4UkyLaA8pFg+0=
+
+Name: manifest.json
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: 3Lqk7XeEqp3xKeiutlxEfw==
+SHA1-Digest: ZGi6NqcobGpS1RvvyvRjw0UIsNc=
+
+Name: manual.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: F4FUSlFT+SzwwhVIs2cITg==
+SHA1-Digest: Ni3IUAVvHRFU6fm9oSkajGDeNW8=
+
+Name: passive_read_css.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: EazQ7CozhixAv9FFyTn7nw==
+SHA1-Digest: giclPy4jXtWSxDt7qUg32WvxESI=
+
+Name: unhide_css.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: r9yCr5Gq9KKGCBAqchqckg==
+SHA1-Digest: DFhj5jTJVXhfEE7HVUz6h7JHd1E=
+
+Name: icons/16x16.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: DQYLJy5j8HCQQMWBom0PvA==
+SHA1-Digest: L3qzeu85otC1/IrPC8CsZSFZLVk=
+
+Name: icons/16x16_2.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: NEdnIgE7tyZKOXG/VOVezw==
+SHA1-Digest: cYWgJGqTbH9vSQtLMaq5GrU0xbc=
+
+Name: icons/48x48.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: pEPpbN5ttiXyPnhQzBKKrQ==
+SHA1-Digest: 6lc40a+RRxqVcIsttO3TWsszjYg=
+
+Name: popup/popup.css
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: sI09LY624Ww1cE48VgCR5Q==
+SHA1-Digest: rjAaLEFaqS6lW4KcK40dPEsptXI=
+
+Name: popup/popup.html
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: PolGMGbRFZc26ewgpBsAKg==
+SHA1-Digest: Q4ZETG7Y/yeDJoMOLYVI9OJkoUM=
+
+Name: popup/popup.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: zocAaRgcEsEEFulzG3hM9w==
+SHA1-Digest: 8MH/b7/SXm+w837qn4OCdcFG5CU=
+
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/META-INF/mozilla.rsa b/data/extensions/SubmitMe@0xbeef.coffee/META-INF/mozilla.rsa
new file mode 100644
index 0000000..e336502
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/META-INF/mozilla.rsa
Binary files differ
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/META-INF/mozilla.sf b/data/extensions/SubmitMe@0xbeef.coffee/META-INF/mozilla.sf
new file mode 100644
index 0000000..4128f11
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+Signature-Version: 1.0
+MD5-Digest-Manifest: CvxK+uwwFskwpo9Ijs5/Fw==
+SHA1-Digest-Manifest: kHWL8c6NlQeffAU7mUUCnAnGUmM=
+
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/background.js b/data/extensions/SubmitMe@0xbeef.coffee/background.js
new file mode 100644
index 0000000..31688d5
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/background.js
@@ -0,0 +1,159 @@
+/*
+Copyright (C) 2017 Nathan Nichols
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NATHAN NICHOLS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+console.log("background.js");
+var not_executing = true;
+
+var notify_id = "submit-me";
+
+function display_multiple_forms(){
+ browser.notifications.create(notify_id, {
+ "type": "basic",
+ "iconUrl": browser.extension.getURL("icons/48x48.png"),
+ "title": "Multiple possible forms",
+ "message": "The website uses a submit button outside of a form.<br> Please select which form you would like to attempt to submit."
+ });
+};
+
+function display_single_form(){
+ browser.notifications.create(notify_id, {
+ "type": "basic",
+ "iconUrl": browser.extension.getURL("icons/48x48.png"),
+ "title": "Multiple possible forms",
+ "message": "The website uses a submit button outside of a form.<br> Please select which form you would like to attempt to submit."
+ });
+};
+/*
+browser.contextMenus.create({
+ id: "submit-me",
+ title: "Force submit a form",
+ contexts: ["all"]
+});
+*/
+browser.contextMenus.create({
+ id: "reveal-css",
+ title: "Remove all page's CSS",
+ contexts: ["all"]
+});
+
+function display_manual_dialog(){
+ function onExecuted(result) {
+ console.log("manual.js executed.");
+ not_executing = true;
+ }
+
+ function onError(error) {
+ console.log("Error in manual.js");
+ console.log(error);
+ }
+ var executing = browser.tabs.executeScript({
+ file: "/manual.js",
+ allFrames: true
+ });
+ executing.then(onExecuted, onError);
+}
+
+function passive_read_css(){
+ function onExecuted(result) {
+ console.log("passive_read_css.js executed.");
+ }
+
+ function onError(error) {
+ console.log("Error in passive_read_css.js");
+ console.log(error);
+ }
+ var executing = browser.tabs.executeScript({
+ file: "/passive_read_css.js",
+ allFrames: true
+ });
+ //not_executing = false;
+ executing.then(onExecuted, onError);
+}
+
+function fix_css(){
+ function onExecuted(result) {
+ console.log("unhide_css.js executed.");
+ not_executing = true;
+ }
+
+ function onError(error) {
+ console.log("Error in unhide_css.js");
+ console.log(error);
+ not_executing = true;
+ }
+ var executing = browser.tabs.executeScript({
+ file: "/unhide_css.js",
+ allFrames: true
+ });
+ not_executing = false;
+ executing.then(onExecuted, onError);
+}
+
+function input(message){
+
+ if(message["msg"] == "multiple-forms"){
+ display_manual_dialog();
+ }
+ if(message["msg"] == "add-on-invoked"){
+ browser.notifications.create(notify_id, {
+ "type": "basic",
+ "iconUrl": browser.extension.getURL("icons/48x48.png"),
+ "title": "Submit Me",
+ "message": "Please click the button you would normally click to submit the broken form."
+ });
+ }
+};
+
+browser.runtime.onMessage.addListener(input);
+var show = false;
+browser.pageAction.onClicked.addListener(function(info, tab) {
+ show = !show;
+ if(show){
+ } else{
+ browser.pageAction.hide(tab.id);
+ browser.pageAction.show(tab.id);
+ }
+});
+
+browser.contextMenus.onClicked.addListener(function(info, tab) {
+ console.log(info);
+ /*
+ if(info.menuItemId == "submit-me-manual" && not_executing){
+ not_executing = false;
+ display_manual_dialog();
+ }
+ */
+ if(info.menuItemId == "reveal-css" && not_executing){
+ not_executing = false;
+ fix_css();
+ }
+ if (info.menuItemId == "submit-me") {
+ console.log("Context menu button clicked");
+ browser.pageAction.show(tab.id);
+
+ function onExecuted(result) {
+ console.log("Main.js executed.");
+ }
+
+ function onError(error) {
+ console.log("Error in main.js");
+ console.log(error);
+ }
+ var executing = browser.tabs.executeScript({
+ file: "/main.js",
+ allFrames: true
+ });
+ executing.then(onExecuted, onError);
+ }
+});
+
+passive_read_css();
+
+// https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus/create
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/icons/16x16.png b/data/extensions/SubmitMe@0xbeef.coffee/icons/16x16.png
new file mode 100644
index 0000000..e0014e1
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/icons/16x16.png
Binary files differ
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/icons/16x16_2.png b/data/extensions/SubmitMe@0xbeef.coffee/icons/16x16_2.png
new file mode 100644
index 0000000..8feed44
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/icons/16x16_2.png
Binary files differ
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/icons/48x48.png b/data/extensions/SubmitMe@0xbeef.coffee/icons/48x48.png
new file mode 100644
index 0000000..cb6623d
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/icons/48x48.png
Binary files differ
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/improve_css.js b/data/extensions/SubmitMe@0xbeef.coffee/improve_css.js
new file mode 100644
index 0000000..5e973e3
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/improve_css.js
@@ -0,0 +1,79 @@
+/*
+
+Copyright (C) 2017 Nathan Nichols
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NATHAN NICHOLS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+
+function unescapeHTML (unsafe_str) {
+ return unsafe_str
+ .replace(/&amp;/g, '&')
+ .replace(/&lt;/g, '<')
+ .replace(/&gt;/g, '>')
+ .replace(/&quot;/g, '\"')
+ .replace(/\&#39;/g, '\'')
+ .replace(/&#x2F/g, '\/')
+}
+
+
+function escapeHTML (unsafe_str) {
+ return unsafe_str
+ .replace(/&/g, '&amp;')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/\"/g, '&quot;')
+ .replace(/\'/g, '&#39;')
+ .replace(/\//g, '&#x2F;')
+}
+
+console.log("passive_improve_css.js");
+var content;
+function replace_regex(){
+ content = content.replace(/type\s*\=\s*("|')\s*hidden\s*\1\s*;/g,""); // type=hidden (HTML inputs can have this);
+ content = content.replace(/display\s*:\s*none/g,""); // display:none ()
+ content = content.replace(/visibility\s*:\s*hidden/g,""); // visibility: hidden
+ document.documentElement.innerHTML = "<html>"+content+"</html>";
+}
+
+function reveal_css(){
+// content = escapeHTML(document.documentElement.innerHTML);
+ content = document.documentElement.innerHTML;
+ var a = content.match(/type\s*\=\s*("|')\s*hidden\s*\1\s*;/g); // type=hidden (HTML inputs can have this);
+ var b = content.match(/display\s*:\s*none/g); // display:none
+ var c = content.match(/visibility\s*:\s*hidden/g); // visibility: hidden
+
+ if(a === null){a = 0;}else{a = a.length;}
+ if(b === null){b = 0;}else{b = b.length;}
+ if(c === null){c = 0;}else{c = c.length;}
+ var to_insert = '<div style="opacity: 0.5; font-size: small; z-index: 2147483647; position: fixed; right: 1%; top: 4%;" id="abc123_main_div"><input id="abc123_reveal_button" value="Click to reveal hidden elements"type="button"></input><br><input id="abc123_rm_buttons" value="remove buttons" type="button"></input></div>';
+ document.body.insertAdjacentHTML('afterbegin', to_insert);
+ document.getElementById("abc123_reveal_button").addEventListener("click",function(){
+ replace_regex();
+ document.getElementById("abc123_reveal_button").remove();
+ });
+ document.getElementById("abc123_rm_buttons").addEventListener("click",function(){
+ document.getElementById("abc123_rm_buttons").remove();
+ document.getElementById("abc123_reveal_button").remove();
+ document.getElementById("abc123_main_div").remove();
+ });
+ //if(a+b+c >= 1 && window.confirm("Hidden HTML detected, would you like to reveal it?")){
+
+ return 0;
+}
+
+reveal_css();
+
+
+/*
+var a = document.getElementsByTagName("style")[2];
+var btn = document.createElement("style"); // Create a <button> element
+var t = document.createTextNode("body{display:inline !important;}"); // Create a text node
+btn.appendChild(t); // Append the text to <button>
+a.insertAdjacentElement("beforeBegin",btn);
+*/
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/manifest.json b/data/extensions/SubmitMe@0xbeef.coffee/manifest.json
new file mode 100644
index 0000000..6a75fe7
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/manifest.json
@@ -0,0 +1,44 @@
+{
+ "manifest_version": 2,
+ "name": "Reveal hidden HTML elements",
+ "version": "1.8",
+ "author": "Nathan Nichols",
+ "description": "Allows you to force all hidden text on a page to show, and alerts you if it detects a significant amount of hidden text on a page.",
+ "applications": {
+ "gecko": {
+ "id": "SubmitMe@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "icons":{
+ "16": "icons/16x16.png",
+ "48": "icons/48x48.png"
+ },
+ "permissions": [
+ "contextMenus",
+ "webRequest",
+ "activeTab",
+ "notifications",
+ "<all_urls>"
+ ],
+ "content_scripts": [
+ {
+ "matches": ["<all_urls>"],
+ "js": ["improve_css.js"]
+ }],
+ "page_action": {
+ "browser_style": true,
+ "default_icon": {
+ "16": "icons/16x16.png",
+ "48": "icons/48x48.png"
+ },
+ "default_title": "Submit Me",
+ "default_popup": "popup/popup.html"
+ },
+
+
+ "background": {
+ "scripts": ["background.js"]
+ }
+
+}
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/manual.js b/data/extensions/SubmitMe@0xbeef.coffee/manual.js
new file mode 100644
index 0000000..7d4a8cb
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/manual.js
@@ -0,0 +1,47 @@
+// This file isn't used, I found that it doesn't work very well
+
+/*
+Copyright (C) 2017 Nathan Nichols
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NATHAN NICHOLS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+console.log("manual.js");
+
+function tree(forms){
+ var kids = [];
+ var out_str = "";
+ for(var i = 0; i < forms.length; i++){
+ kids = [];
+ for(var j = 0; j < forms[i].children.length; j++){
+ if(forms[i].children[j].tagName == "INPUT"){
+ kids.push(forms[i].children[j]);
+ }
+ }
+ out_str += "\nForm number " + (i + 1) + ":";
+ for(var j = 0; j < kids.length; j++){
+ out_str += "\n Item #"+(j+1)+":";
+ out_str += "\n Text:'"+kids[j].innerHTML+"'";
+ out_str += "\n Name:'"+kids[j].name+"'";
+ out_str += "\n Value:'"+kids[j].value+"'";
+ }
+
+ }
+ return out_str;
+}
+
+var forms = document.getElementsByTagName("form");
+
+console.log("multiple possible forms.");
+var a = window.prompt("Please select one of the following forms:\n" + tree(forms) + "\n\n Enter a number to submit that form. Any other input will cancel this operation.");
+if(parseInt(a) === NaN){
+ console.log("not a number.");
+} else {
+ if( (parseInt(a)-1) < forms.length){
+ forms[parseInt(a)-1].submit();
+ }
+}
+
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/passive_read_css.js b/data/extensions/SubmitMe@0xbeef.coffee/passive_read_css.js
new file mode 100644
index 0000000..09989d2
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/passive_read_css.js
@@ -0,0 +1,58 @@
+/*
+
+Copyright (C) 2017 Nathan Nichols
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NATHAN NICHOLS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+function escapeHTML (unsafe_str) {
+ return unsafe_str
+ .replace(/&/g, '&amp;')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/\"/g, '&quot;')
+ .replace(/\'/g, '&#39;')
+ .replace(/\//g, '&#x2F;')
+}
+
+console.log("passive_improve_css.js");
+var content;
+function replace_regex(){
+ content = content.replace(/type\s*\=\s*("|')\s*hidden\s*\1\s*;/g,""); // type=hidden (HTML inputs can have this);
+ content = content.replace(/display\s*:\s*none/g,""); // display:none ()
+ content = content.replace(/visibility\s*:\s*hidden/g,""); // visibility: hidden
+ document.documentElement.innerHTML = content;
+}
+
+function reveal_css(){
+ content = escapeHTML(document.documentElement.innerHTML);
+ var a = content.match(/type\s*\=\s*("|')\s*hidden\s*\1\s*;/g); // type=hidden (HTML inputs can have this);
+ var b = content.match(/display\s*:\s*none/g); // display:none
+ var c = content.match(/visibility\s*:\s*hidden/g); // visibility: hidden
+
+ if(a === null){a = 0;}else{a = a.length;}
+ if(b === null){b = 0;}else{b = b.length;}
+ if(c === null){c = 0;}else{c = c.length;}
+
+ if(a+b+c >= 1 && window.confirm("Hidden HTML detected, would you like to reveal it?")){
+ replace_regex()
+ }
+
+ return 0;
+}
+
+reveal_css();
+
+
+/*
+var a = document.getElementsByTagName("style")[2];
+var btn = document.createElement("style"); // Create a <button> element
+var t = document.createTextNode("body{display:inline !important;}"); // Create a text node
+btn.appendChild(t); // Append the text to <button>
+a.insertAdjacentElement("beforeBegin",btn);
+*/
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.css b/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.css
new file mode 100644
index 0000000..046cfee
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.css
@@ -0,0 +1,7 @@
+body {
+ font-family: LiberationMono;
+ top: 5%;
+ margin-left: 10%;
+ margin-right: 10%;
+ background-color: white;
+}
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.html b/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.html
new file mode 100644
index 0000000..e537b14
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!---
+<html>
+ <head>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="popup/popup.css"/>
+ </head>
+ <body>
+ <h1>Options</h1>
+ <form>
+ <div id="options">
+ <input type="radio" name="gender" value="male" checked> Male<br>
+ <input type="radio" name="gender" value="female"> Female<br>
+ <input type="radio" name="gender" value="other"> Other
+ <input type="button" name="submit" type="submit" value="Force Submit">
+ </div>
+ </form>
+ <script src="popup/popup.js"></script>
+ </body>
+</html>
+!-->
+
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.js b/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.js
new file mode 100644
index 0000000..95000f3
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/popup/popup.js
@@ -0,0 +1 @@
+console.log("popup.js")
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/unhide_css.js b/data/extensions/SubmitMe@0xbeef.coffee/unhide_css.js
new file mode 100644
index 0000000..d7467b6
--- /dev/null
+++ b/data/extensions/SubmitMe@0xbeef.coffee/unhide_css.js
@@ -0,0 +1,34 @@
+/*
+
+Copyright (C) 2017 Nathan Nichols
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NATHAN NICHOLS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+console.log("improve_css.js");
+var a = document.getElementsByTagName("link");
+
+for(var i = 0; i < a.length; i++){
+ try{
+ if(a[i].href.indexOf(".css") != -1){
+ a[i].remove();
+ }
+ } catch(e){
+ console.log(e);// really don't care too much
+ }
+}
+
+var b = document.getElementsByTagName("style");
+
+for(var i = 0; i < b.length; i++){
+ try{
+ b[i].remove();
+ } catch(e){
+ console.log(e);// really don't care too much
+ }
+}
+