summaryrefslogtreecommitdiff
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
parent25e19003125673213cbfa15a3adb04b7c6371c4d (diff)
Added extension collection https://addons.mozilla.org/en-US/firefox/collections/NateN1222/librejs-compatibility-add-ons/
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/License8
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/META-INF/manifest.mf32
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/META-INF/mozilla.rsabin0 -> 4178 bytes
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/META-INF/mozilla.sf4
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre.pngbin0 -> 381 bytes
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre128.pngbin0 -> 5760 bytes
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre48.pngbin0 -> 1404 bytes
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/manifest.json32
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/pay.js18
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/License9
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/META-INF/manifest.mf37
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/META-INF/mozilla.rsabin0 -> 4179 bytes
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/META-INF/mozilla.sf4
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/background.js74
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/icons/I128.pngbin0 -> 2732 bytes
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/icons/I16.pngbin0 -> 303 bytes
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/icons/I48.pngbin0 -> 795 bytes
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/main.js328
-rw-r--r--data/extensions/FreeUSPS@0xbeef.coffee/manifest.json37
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/License9
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/META-INF/manifest.mf32
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/META-INF/mozilla.rsabin0 -> 4175 bytes
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/META-INF/mozilla.sf4
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/icons/I128.pngbin0 -> 863 bytes
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/icons/I16.pngbin0 -> 231 bytes
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/icons/I48.pngbin0 -> 364 bytes
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/main.js394
-rw-r--r--data/extensions/LCSP@0xbeef.coffee/manifest.json38
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/License8
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/manifest.mf32
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/mozilla.rsabin0 -> 4183 bytes
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/mozilla.sf4
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/google_drive.js105
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre.pngbin0 -> 238 bytes
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre128.pngbin0 -> 1283 bytes
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre48.pngbin0 -> 402 bytes
-rw-r--r--data/extensions/LibrejsDrive@0xbeef.coffee/manifest.json29
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/License11
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/License~4
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/manifest.mf47
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/mozilla.rsabin0 -> 4184 bytes
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/mozilla.sf4
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/background.js35
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/background.js~37
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/improve_css.js~24
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/main.js87
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/main.js~86
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/manifest.json35
-rw-r--r--data/extensions/SimpleSumOfUs@0xbeef.coffee/manifest.json~36
-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
-rw-r--r--data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/manifest.mf27
-rw-r--r--data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/mozilla.rsabin0 -> 4183 bytes
-rw-r--r--data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/mozilla.sf4
-rw-r--r--data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre.pngbin0 -> 174 bytes
-rw-r--r--data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre128.pngbin0 -> 841 bytes
-rw-r--r--data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre48.pngbin0 -> 228 bytes
-rw-r--r--data/extensions/rnrMcDonalds@0xbeef.coffee/manifest.json29
-rw-r--r--data/extensions/rnrMcDonalds@0xbeef.coffee/mcdonalds_wifi.js43
-rw-r--r--data/extensions/rsf@0xbeef.coffee/License8
-rw-r--r--data/extensions/rsf@0xbeef.coffee/META-INF/manifest.mf22
-rw-r--r--data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.rsabin0 -> 4174 bytes
-rw-r--r--data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.sf4
-rw-r--r--data/extensions/rsf@0xbeef.coffee/icons/L4Libre128.pngbin0 -> 867 bytes
-rw-r--r--data/extensions/rsf@0xbeef.coffee/manifest.json28
-rw-r--r--data/extensions/rsf@0xbeef.coffee/rsf.js32
-rw-r--r--data/update-extensions.sh25
81 files changed, 2395 insertions, 0 deletions
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/License b/data/extensions/DMCAreg@0xbeef.coffee/License
new file mode 100644
index 0000000..638bb51
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/License
@@ -0,0 +1,8 @@
+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/DMCAreg@0xbeef.coffee/META-INF/manifest.mf b/data/extensions/DMCAreg@0xbeef.coffee/META-INF/manifest.mf
new file mode 100644
index 0000000..106504b
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/META-INF/manifest.mf
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+
+Name: License
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: o1+NLuXuBdXDUPbqMKclVg==
+SHA1-Digest: 9neKP3yy2up5cLrNOoXL0zOPkJY=
+
+Name: manifest.json
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: plVjkV5vw62PP3C1ag8n4A==
+SHA1-Digest: fCJ+1mLGxjfzj3xmUHIy9TR/nEc=
+
+Name: pay.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: un4kqaAFIqxkDGcTHwwZ2g==
+SHA1-Digest: VYVMmOvziHYXJmasJpY9M2OLaK0=
+
+Name: icons/L4Libre.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: 4zvLiRtcfTqAAD1tLrsEsw==
+SHA1-Digest: GcCCKFQJ8W4Nzd7mW4zEUs0xvg8=
+
+Name: icons/L4Libre128.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: BMl+LQVFGtIQC362YUozGA==
+SHA1-Digest: c4gIR+7dTNjGG4GxGBOTfen9f/Q=
+
+Name: icons/L4Libre48.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: GRl/Cx1lCE7LCMC7s3NEsg==
+SHA1-Digest: OPRWh2l1CljS+seEgz068G4P1VA=
+
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/META-INF/mozilla.rsa b/data/extensions/DMCAreg@0xbeef.coffee/META-INF/mozilla.rsa
new file mode 100644
index 0000000..ab41cd9
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/META-INF/mozilla.rsa
Binary files differ
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/META-INF/mozilla.sf b/data/extensions/DMCAreg@0xbeef.coffee/META-INF/mozilla.sf
new file mode 100644
index 0000000..e16c4f1
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+Signature-Version: 1.0
+MD5-Digest-Manifest: R9AHFPujT+Ocr4LtNuk2sA==
+SHA1-Digest-Manifest: Nhpj/7FX8Proki24oFhkqBD2hfQ=
+
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre.png b/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre.png
new file mode 100644
index 0000000..0ac7b4b
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre.png
Binary files differ
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre128.png b/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre128.png
new file mode 100644
index 0000000..cb8eea3
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre128.png
Binary files differ
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre48.png b/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre48.png
new file mode 100644
index 0000000..66200a9
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/icons/L4Libre48.png
Binary files differ
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/manifest.json b/data/extensions/DMCAreg@0xbeef.coffee/manifest.json
new file mode 100644
index 0000000..0e1b4d9
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/manifest.json
@@ -0,0 +1,32 @@
+{
+ "manifest_version": 2,
+ "name": "LibreJS compatible Pay.gov",
+ "version": "1.0",
+ "author": "Nathan Nichols",
+ "id": "DMCAreg@0xbeef.coffee",
+ "description": "Allows LibreJS users to register DMCA claim contacts at the DMCA registry.",
+ "icons": {
+ "16": "icons/L4Libre.png",
+ "48": "icons/L4Libre48.png",
+ "128": "icons/L4Libre128.png"
+ },
+ "applications": {
+ "gecko": {
+ "id": "DMCAreg@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "permissions": [
+ "webRequest"
+ ],
+ "content_scripts": [
+ {
+ "matches": [
+ "https://www.pay.gov/tcsonline/*"
+ ],
+ "js": [
+ "pay.js"
+ ]
+ }
+ ]
+}
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/pay.js b/data/extensions/DMCAreg@0xbeef.coffee/pay.js
new file mode 100644
index 0000000..c56d745
--- /dev/null
+++ b/data/extensions/DMCAreg@0xbeef.coffee/pay.js
@@ -0,0 +1,18 @@
+/*
+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.
+*/
+
+if(document.location.href.indexOf("pay.gov/tcsonline/") != -1){
+ console.log("detected paymeny page.");
+
+ document.getElementById("hiddenContinueButton").style.display = "";
+ document.getElementById("statesCAN").remove();
+ document.getElementById("statesUSA").remove();
+ document.getElementById("stateText").value = "2 letter code";
+}
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/License b/data/extensions/FreeUSPS@0xbeef.coffee/License
new file mode 100644
index 0000000..b177441
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/License
@@ -0,0 +1,9 @@
+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/FreeUSPS@0xbeef.coffee/META-INF/manifest.mf b/data/extensions/FreeUSPS@0xbeef.coffee/META-INF/manifest.mf
new file mode 100644
index 0000000..c5cb2f7
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/META-INF/manifest.mf
@@ -0,0 +1,37 @@
+Manifest-Version: 1.0
+
+Name: background.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: anJmujo/JpQoRwmLha7B0Q==
+SHA1-Digest: Cd+vGYoTJP5/4K5lErwPnk+xFlg=
+
+Name: License
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: NXJDNzwM2x6fmAJU3yJhNw==
+SHA1-Digest: DRMOi53/2uhUuaVTT3mH4dmf8EY=
+
+Name: main.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: oJyJ9MkJqhM4KPpf2r7Sxw==
+SHA1-Digest: a3bXJtUtKI580JbNbGUBR8h7d68=
+
+Name: manifest.json
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: t8dn9k4n4KeLxS5Mgi+B3A==
+SHA1-Digest: jTOPQMtdxvqzfk/7X484cKsDCzs=
+
+Name: icons/I128.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: AZ4xpdwVD14fl1Wk39LmNg==
+SHA1-Digest: i3w2i9KY9fpd6EiML6dv45dMzSI=
+
+Name: icons/I16.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: GeAgxpISec3Y6Xj8hmjPbg==
+SHA1-Digest: vQaIQNT4DUQRlFTWKzG653tt4jA=
+
+Name: icons/I48.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: KnUukzLPhEmbn80F/MDvGA==
+SHA1-Digest: hWhi1iiksOaWzEoiBbvhy9/3lvE=
+
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/META-INF/mozilla.rsa b/data/extensions/FreeUSPS@0xbeef.coffee/META-INF/mozilla.rsa
new file mode 100644
index 0000000..0eb2521
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/META-INF/mozilla.rsa
Binary files differ
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/META-INF/mozilla.sf b/data/extensions/FreeUSPS@0xbeef.coffee/META-INF/mozilla.sf
new file mode 100644
index 0000000..77cd900
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+Signature-Version: 1.0
+MD5-Digest-Manifest: VDB50VnOJJrZdoXpmYX4Ow==
+SHA1-Digest-Manifest: jfhv2ZY4PCVaeDemugkNpSpAtws=
+
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/background.js b/data/extensions/FreeUSPS@0xbeef.coffee/background.js
new file mode 100644
index 0000000..da00569
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/background.js
@@ -0,0 +1,74 @@
+/*
+
+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.
+
+*/
+var target = "https://postcalc.usps.com/Calculator/GetMailServices";
+var start;
+var weight;
+
+function query_string(json) {
+ return '?' +
+ Object.keys(json).map(function(key) {
+ return encodeURIComponent(key) + '=' +
+ encodeURIComponent(json[key]);
+ }).join('&');
+}
+function message_received(message){
+
+ if(message["start"] === undefined){
+ } else{
+ start = message["start"];
+ }
+
+ if(message["weight"] === undefined){
+ } else{
+ weight = message["weight"];
+ var a = {
+ countryID: document.getElementById('MachProp_ShpSz_IdxPg_CountryID').value,
+ countryCode: document.getElementById('MachProp_ShpSz_IdxPg_CountryCode').value,
+ origin: document.getElementById('MachProp_ShpSz_IdxPg_Origin').value,
+ isOrigMil: document.getElementById('MachProp_ShpSz_IdxPg_IsOriginMilitary').value,
+ destination: document.getElementById('MachProp_ShpSz_IdxPg_Destination').value,
+ isDestMil: document.getElementById('MachProp_ShpSz_IdxPg_IsDestinationMilitary').value,
+ shippingDate: document.getElementById('MachProp_ShpSz_IdxPg_ShippingDate').value,
+ itemValue: document.getElementById('MachProp_ShpSz_IdxPg_ItemValue').value,
+ dayOldPoultry: document.getElementById('MachProp_ShpSz_IdxPg_DayOldPoultry').value,
+ groundTransportation: document.getElementById('MachProp_ShpSz_IdxPg_GroundTransportation').value,
+ hazmat: document.getElementById('MachProp_ShpSz_IdxPg_Hazmat').value,
+ liveAnimals: document.getElementById('MachProp_ShpSz_IdxPg_LiveAnimals').value,
+ nonnegotiableDocument: document.getElementById('MachProp_ShpSz_IdxPg_NonnegotiableDocument').value,
+ mailShapeAndSize: document.getElementById('MachProp_ShpSz_IdxPg_MailShapeAndSize').value,
+ pounds: document.getElementById('MachProp_ShpSz_Pounds').value,
+ ounces: document.getElementById('MachProp_ShpSz_Ounces').value,
+ length: document.getElementById('MachProp_Length').value,
+ height: document.getElementById('MachProp_Height').value,
+ width: document.getElementById('MachProp_Width').value,
+ girth: document.getElementById('MachProp_Girth').value,
+ shape: document.getElementById('MachProp_Shape').value,
+ nonmachinable: document.getElementById('MachProp_Nonmachinable').value,
+ isEmbedded: document.getElementById('MachProp_ShpSz_IdxPg_IsEmbedded').value
+ };
+
+ var a = new XMLHttpRequest();
+ var write_loc = document.getElementsByClassName("container")[1];;
+ a.open("GET", "https://postcalc.usps.com/Calculator/GetMailServices" + query_string(postme))
+ a.onload = function(){
+ var response = JSON.parse(this.response)["Page"];
+ for(var i = 0; i < response["MailServices"].length; i++){
+ write_loc += response["MailServices"][i];
+ }
+ }
+ a.setRequestHeader("Accept","application/json, text/javascript, */*; q=0.01");
+ a.setRequestHeader("X-Requested-With","XMLHttpRequest");
+ a.setRequestHeader("Referer","https://postcalc.usps.com/Calculator/MailServices");
+ }
+}
+browser.runtime.onMessage.addListener(message_received);
+
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/icons/I128.png b/data/extensions/FreeUSPS@0xbeef.coffee/icons/I128.png
new file mode 100644
index 0000000..e5271b5
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/icons/I128.png
Binary files differ
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/icons/I16.png b/data/extensions/FreeUSPS@0xbeef.coffee/icons/I16.png
new file mode 100644
index 0000000..6ab10d6
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/icons/I16.png
Binary files differ
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/icons/I48.png b/data/extensions/FreeUSPS@0xbeef.coffee/icons/I48.png
new file mode 100644
index 0000000..a9ef683
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/icons/I48.png
Binary files differ
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/main.js b/data/extensions/FreeUSPS@0xbeef.coffee/main.js
new file mode 100644
index 0000000..61cfe71
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/main.js
@@ -0,0 +1,328 @@
+/*
+
+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.
+
+*/
+
+var target = "https://postcalc.usps.com/Calculator/GetMailServices";
+
+// The website has a bar identified by it's CSS class "breadcrumb"
+// that is basically the working directory of the calculator (tells what stage the calculating process is on).
+// On the first page it isn't there, but on the others it is.
+// This is the main thing I use to detect what javascript needs to be run.
+
+function qs2json(a){
+ let url = new URL(a);
+ var result = Object.create(null);
+ for(let i of url.searchParams) {
+ result[i[0]] = i[1];
+ }
+ //console.log(JSON.stringify(result, undefined, 4));
+ return JSON.stringify(result, undefined, 4);
+}
+function query_string(json) {
+ return '?' +
+ Object.keys(json).map(function(key) {
+ if(key === undefined){
+ return "=";
+ }else{
+ return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]);
+ }
+ }).join('&')
+}
+function lbs_2_kg(lbs,oz){
+ return ( lbs + (oz*(1/16)) ) * 0.453592;
+}
+var a = document.getElementsByClassName("breadcrumb")[0];
+
+if(a === undefined){
+ //console.log("first page");
+ var a = "first";
+} else{
+ a = a.getElementsByClassName("active")[0].innerText;
+ //console.log(a);
+}
+
+var html_form = document.getElementsByTagName("form")[0];
+
+// this is the main one that is broken.
+if(a == "Mail Services"){
+
+ console.log("reached broken page");
+ var all_data = {
+ countryID: document.getElementById('MachProp_ShpSz_IdxPg_CountryID').value,
+ countryCode: document.getElementById('MachProp_ShpSz_IdxPg_CountryCode').value,
+ origin: document.getElementById('MachProp_ShpSz_IdxPg_Origin').value,
+ isOrigMil: document.getElementById('MachProp_ShpSz_IdxPg_IsOriginMilitary').value,
+ destination: document.getElementById('MachProp_ShpSz_IdxPg_Destination').value,
+ isDestMil: document.getElementById('MachProp_ShpSz_IdxPg_IsDestinationMilitary').value,
+ shippingDate: document.getElementById('MachProp_ShpSz_IdxPg_ShippingDate').value,
+ itemValue: document.getElementById('MachProp_ShpSz_IdxPg_ItemValue').value,
+ dayOldPoultry: document.getElementById('MachProp_ShpSz_IdxPg_DayOldPoultry').value,
+ groundTransportation: document.getElementById('MachProp_ShpSz_IdxPg_GroundTransportation').value,
+ hazmat: document.getElementById('MachProp_ShpSz_IdxPg_Hazmat').value,
+ liveAnimals: document.getElementById('MachProp_ShpSz_IdxPg_LiveAnimals').value,
+ nonnegotiableDocument: document.getElementById('MachProp_ShpSz_IdxPg_NonnegotiableDocument').value,
+ mailShapeAndSize: document.getElementById('MachProp_ShpSz_IdxPg_MailShapeAndSize').value,
+ pounds: document.getElementById('MachProp_ShpSz_Pounds').value,
+ ounces: document.getElementById('MachProp_ShpSz_Ounces').value,
+ length: document.getElementById('MachProp_Length').value,
+ height: document.getElementById('MachProp_Height').value,
+ width: document.getElementById('MachProp_Width').value,
+ girth: document.getElementById('MachProp_Girth').value,
+ shape: document.getElementById('MachProp_Shape').value,
+ nonmachinable: document.getElementById('MachProp_Nonmachinable').value,
+ isEmbedded: document.getElementById('MachProp_ShpSz_IdxPg_IsEmbedded').value
+ };
+ //console.log("all data:");
+ //console.log(all_data);
+ var x = new XMLHttpRequest();
+ var write_loc = document.getElementsByClassName("container")[1];
+
+ function write_val(a){
+ write_loc.innerHTML += "<br>";
+ write_loc.innerHTML += a;
+ };
+
+ x.open("GET", "https://postcalc.usps.com/Calculator/GetMailServices"+query_string(all_data));
+ x.onload = function(){
+ var response = JSON.parse(this.response)["Page"];
+ if(JSON.parse(this.response)["PageError"] != ""){
+ write_val("<b>----------"+JSON.parse(this.response)["PageError"]+"----------</b>");
+ for(var i = 0; i < JSON.parse(this.response)["Page"]["Footnotes"].length; i++){
+ write_val(JSON.parse(this.response)["Page"]["Footnotes"][i]);
+ }
+ return;
+ }
+ for(var i = 0; i < response["MailServices"].length; i++){
+ write_val(" ");
+ write_val("<b>----------"+response["MailServices"][i]["Title"]+"----------</b>");
+ write_val(' <img src="'+response["MailServices"][i]["ImageURL"]+'" height="128" width="128">');
+ if(response["MailServices"][i]["Dimensions"] != ""){
+ write_val(" <b>Dimensions:</b> " + response["MailServices"][i]["Dimensions"]);
+ }
+ var opts = response["MailServices"][i]["DeliveryOptions"];
+ for(var j = 0; j < opts.length; j++){
+ write_val(" <b>"+opts[j]["Name"]+" ("+opts[j]["DeliveryDay"]+")"+":</b>");
+ write_val(" Click-N-Ship® Price:"+opts[j]["CnSPrice"]);
+ write_val(" Retail Price:"+opts[j]["RetailPrice"]);
+ write_val(' Extra services (customs forms, etc..):<a href="'+opts[j]["URL"]+'">[click]</a>');
+ }
+
+ //console.log(response["MailServices"][i]);
+ }
+ }
+ x.setRequestHeader("Accept","application/json, text/javascript, */*; q=0.01");
+ x.setRequestHeader("X-Requested-With","XMLHttpRequest");
+ x.setRequestHeader("Referer","https://postcalc.usps.com/Calculator/MailServices");
+ x.send();
+}
+// This one is also broken but much simpler.
+// USPS has an API for checking zip codes. Perhaps they were calling this API in the onclick JS
+// and that was what caused it to get flagged as non-trivial? Will skipping this check cause
+// bugs to arise?
+if(a == "GXG Mailing Location"){
+ var button = document.getElementsByClassName("btn btn-pcalc hidden-print")[0];
+ button.addEventListener("click", function(){
+ document.getElementsByTagName("form")[0].submit();
+ });
+}
+
+
+if(a == "Weight and Shape/Size"){
+ html_form.onsubmit = function(){
+ var data = {};
+ var inputs = document.getElementsByTagName("input");
+ for(var i = 0; i < inputs.length; i++){
+ data[inputs[i].name] = inputs[i].value;
+ }
+ //console.log(data);
+ data["Kilograms"] = lbs_2_kg(parseFloat(data["Pounds"]),parseFloat(data["Ounces"]));
+ //console.log("sent message");
+ browser.runtime.sendMessage({"weight": data});
+ return true;
+ };
+}
+if(a == "first"){
+ html_form.onsubmit = function(){
+ //console.log("entered first page");
+ var data = {};
+ var inputs = document.getElementsByTagName("input");
+ for(var i = 0; i < inputs.length; i++){
+ data[inputs[i].name] = inputs[i].value;
+ }
+ data["_"] = Date.now();
+ browser.runtime.sendMessage({"start": data});
+ return true;
+ };
+}
+if(a == "Postal Code"){
+ var x = new XMLHttpRequest();
+ x.onload = function(){
+ // gets here when we receive the city data after they submit the form.
+ var response = JSON.parse(this["response"]);
+ //console.log(response);
+ document.getElementById("cities-panel").style = "";
+ var opts_here = document.getElementById("CityID");
+ var opts = response["Options"];
+
+
+ // Added this block because states with more than a small amount of cities would cause
+ // the browser to hang.
+ var i = 0;
+ function next_200(){
+ for(var j = 0; j < 50; j++){
+ if( i+j == opts.length){
+ return 0;
+ } else{
+ opts_here.innerHTML += '<option value="'+opts[i+j]+'">'+opts[i+j]+"</option";
+ }
+ }
+ i += 50;
+ //console.log(i)
+ setTimeout(function() {next_200();},150);
+ }
+ next_200();
+ };
+
+
+ var postal_code_data = {
+ countryCode : document.getElementById("ShpSz_IdxPg_CountryCode").value,
+ stateProvinceID: "", // needs to be entered by the user.
+ _:Date.now()
+ };
+
+ document.getElementById("PostalCodeID").onchange = function(){
+ document.getElementById("Destination").value = document.getElementById("PostalCodeID").value
+ }
+ document.getElementsByClassName("panel-body")[0].style = "";
+ document.getElementById("StateProvinceID").value = document.getElementById("StateProvinceID").children[0].innerText;
+ document.getElementById("StateProvinceID").onchange = function(){
+ // Once they pick a province/state, it has to get the city data.
+ postal_code_data["stateProvinceID"] = document.getElementById("StateProvinceID").value;
+ x.open("GET", "https://postcalc.usps.com/Calculator/StateProvinceSelected"+query_string(postal_code_data));
+ x.setRequestHeader("Accept","application/json, text/javascript, */*; q=0.01");
+ x.setRequestHeader("X-Requested-With","XMLHttpRequest");
+ x.setRequestHeader("Referer","https://postcalc.usps.com/Calculator/PostalCode");
+ x.send();
+ }
+ document.getElementById("CityID").onchange = function(){
+ // Once they pick a city, it has to get the possible postal codes.
+
+ x.onload = function(){
+ // here when we send back the city
+ var response = JSON.parse(this["response"]);
+ //console.log(response);
+ document.getElementById("postal-codes-panel").style = "";
+ var opts = response["Options"];
+ var opts_here = document.getElementById("PostalCodeID");
+ opts_here.innerHTML += '<option value="">Please select one of the following</option';
+ for(var i = 0; i < opts.length; i++){
+ opts_here.innerHTML += '<option value="'+opts[i]+'">'+opts[i]+"</option";
+ }
+
+ };
+ postal_code_data["cityID"] = document.getElementById("CityID").value;
+ //console.log("sending:");
+ //console.log(postal_code_data);
+ x.open("GET", "https://postcalc.usps.com/Calculator/CitySelected"+query_string(postal_code_data));
+ x.setRequestHeader("Accept","application/json, text/javascript, */*; q=0.01");
+ x.setRequestHeader("X-Requested-With","XMLHttpRequest");
+ x.setRequestHeader("Referer","https://postcalc.usps.com/Calculator/PostalCode");
+ x.send();
+ }
+ //document.getElementById("CityID").onchange = function(){}
+}
+
+if(a == "Extra Services"){
+ var target = "Calculator/GetExtraServices";
+ var extra_services_data = {
+ "countryID": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_CountryID").value,
+ "countryCode": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_CountryCode").value,
+ "origin": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_Origin").value,
+ "destination": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_Destination").value,
+ "shippingDate": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_ShippingDate").value,
+ "itemValue": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_ItemValue").value,
+ "dayOldPoultry": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_DayOldPoultry").value,
+ "groundTransportation": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_GroundTransportation").value,
+ "hazmat": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_Hazmat").value,
+ "liveAnimals": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_LiveAnimals").value,
+ "nonnegotiableDocument": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_NonnegotiableDocument").value,
+ "mailShapeAndSize": document.getElementById("MailSrvcs_MachProp_ShpSz_IdxPg_MailShapeAndSize").value,
+ "pounds": document.getElementById("MailSrvcs_MachProp_ShpSz_Pounds").value,
+ "ounces": document.getElementById("MailSrvcs_MachProp_ShpSz_Ounces").value,
+ "length": document.getElementById("MailSrvcs_MachProp_Length").value,
+ "height": document.getElementById("MailSrvcs_MachProp_Height").value,
+ "width": document.getElementById("MailSrvcs_MachProp_Width").value,
+ "girth": document.getElementById("MailSrvcs_MachProp_Girth").value,
+ "shape": document.getElementById("MailSrvcs_MachProp_Shape").value,
+ "nonmachinable": document.getElementById("MailSrvcs_MachProp_Nonmachinable").value,
+ "mailServiceID": document.getElementById("MailSrvcs_MailServiceID").value,
+ "deliveryOption": document.getElementById("MailSrvcs_DeliveryOption").value,
+ "extraServiceSelected": document.getElementById("Selected").value,
+ "additionalInputValues": document.getElementById("AdditionalInputValues").value,
+ "isPostBack": "False"// explanation:
+ // When you select some options, it disables others.
+ // If figures out what options are disabled by any selected option by communicating back to
+ // the website. This value is false for the initial one and true for the rest.
+ };
+
+ var write_loc = document.getElementsByClassName("container")[1];
+
+ function write_val(a){
+ write_loc.innerHTML += "<br>";
+ write_loc.innerHTML += a;
+ };
+ var x = new XMLHttpRequest();
+ x.open("GET", "https://postcalc.usps.com/Calculator/GetExtraServices"+query_string(extra_services_data));
+ x.onload = function(){
+ var response = JSON.parse(this["response"]);
+ if(response["PageError"] != ""){
+ write_val("<b>----------"+response["PageError"]+"----------</b>");
+ return;
+ }
+ response = response["Page"];
+ //console.log(response);
+ // write customs info
+ write_val("<b>----------Customs forms (if applicable)----------</b>");
+ write_val("<i>NOTE: These are beyond the scope of this add-on (for now atleast.)<br> You can still calculate your price and see what options you have.<></i>");
+ for(var i = 0; i < response["CustomsFormPage"]["CustomsForms"].length; i++){
+ write_val(response["CustomsFormPage"]["CustomsForms"][i]["FormName"]);
+ }
+ write_val("<br>NOTE: "+response["CustomsFormPage"]["Footnotes"][0]);
+ // write other services
+ for(var i = 0; i < response["ExtraServices"].length; i++){
+ //console.log(response["ExtraServices"][i]);
+ write_val("<b>----------"+response["ExtraServices"][i]["Name"]+"----------</b>");
+ // Decided not to implement the XHR part of this to keep it simple
+ //write_val('<input type="checkbox" id="'+response["ExtraServices"][i]["ID"]+'" value="checked">');
+ write_val("<i>Retail price: </i>"+response["ExtraServices"][i]["RetailPrice"]);
+ write_val("<i>Click-N-Ship® price: </i>"+response["ExtraServices"][i]["CnSPrice"]);
+ for(var j = 0; j < response["ExtraServices"][i]["Messages"].length; j++){
+ write_val("Message: "+response["ExtraServices"][i]["Messages"][j]);
+ }
+ }
+ }
+ x.setRequestHeader("Accept","application/json, text/javascript, */*; q=0.01");
+ x.setRequestHeader("X-Requested-With","XMLHttpRequest");
+ x.setRequestHeader("Referer","https://postcalc.usps.com/Calculator/MailServices");
+ x.send();
+}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/extensions/FreeUSPS@0xbeef.coffee/manifest.json b/data/extensions/FreeUSPS@0xbeef.coffee/manifest.json
new file mode 100644
index 0000000..fe06261
--- /dev/null
+++ b/data/extensions/FreeUSPS@0xbeef.coffee/manifest.json
@@ -0,0 +1,37 @@
+{
+ "manifest_version": 2,
+ "name": "LibreJS/USPS compatibility",
+ "version": "1.0",
+ "author": "Nathan Nichols",
+ "description": "LibreJS compatible USPS.com shipping calculator.",
+ "applications": {
+ "gecko": {
+ "id": "FreeUSPS@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "icons": {
+ "16": "icons/I16.png",
+ "48": "icons/I48.png",
+ "128": "icons/I128.png"
+ },
+ "permissions": [
+ "webRequest",
+ "webRequestBlocking",
+ "*://www.postcalc.usps.com/*"
+ ],
+
+ "background": {
+ "scripts": ["background.js"]
+ },
+ "content_scripts": [
+ {
+ "matches": [
+ "https://postcalc.usps.com/*"
+ ],
+ "js": [
+ "main.js"
+ ]
+ }
+ ]
+}
diff --git a/data/extensions/LCSP@0xbeef.coffee/License b/data/extensions/LCSP@0xbeef.coffee/License
new file mode 100644
index 0000000..b177441
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/License
@@ -0,0 +1,9 @@
+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/LCSP@0xbeef.coffee/META-INF/manifest.mf b/data/extensions/LCSP@0xbeef.coffee/META-INF/manifest.mf
new file mode 100644
index 0000000..1872aef
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/META-INF/manifest.mf
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+
+Name: License
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: NXJDNzwM2x6fmAJU3yJhNw==
+SHA1-Digest: DRMOi53/2uhUuaVTT3mH4dmf8EY=
+
+Name: main.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: /V2XO7/lvTVjwIMRZW6d0A==
+SHA1-Digest: +2pf7ofZvv9h4iTKi+erRvn/5Zk=
+
+Name: manifest.json
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: BVAydlSLSZ+Vh2Z9AsnW2g==
+SHA1-Digest: EUZisKBpEZbQ0n4HBDC4Yq2AtPw=
+
+Name: icons/I128.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: MhFj+TSGimeyzCyrj4PcIQ==
+SHA1-Digest: QZLYGlkQbW0Qunf2EYpQ/24S7dE=
+
+Name: icons/I16.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: 6IW1z4MpdgzI70VcqSFWlQ==
+SHA1-Digest: 5AdTVz5R1l1+hVRXW28B/D6hAPg=
+
+Name: icons/I48.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: LxqGZohIqQz4Hj1fimM1iQ==
+SHA1-Digest: E2jx51vJLssRxF9rLqcGXXi0WTE=
+
diff --git a/data/extensions/LCSP@0xbeef.coffee/META-INF/mozilla.rsa b/data/extensions/LCSP@0xbeef.coffee/META-INF/mozilla.rsa
new file mode 100644
index 0000000..3b1c84b
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/META-INF/mozilla.rsa
Binary files differ
diff --git a/data/extensions/LCSP@0xbeef.coffee/META-INF/mozilla.sf b/data/extensions/LCSP@0xbeef.coffee/META-INF/mozilla.sf
new file mode 100644
index 0000000..1a5e57a
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+Signature-Version: 1.0
+MD5-Digest-Manifest: tcYoebfpl59bvZ5jQB8Qrw==
+SHA1-Digest-Manifest: nWg4DnQdieMjJS9vZfOL3vzy/TQ=
+
diff --git a/data/extensions/LCSP@0xbeef.coffee/icons/I128.png b/data/extensions/LCSP@0xbeef.coffee/icons/I128.png
new file mode 100644
index 0000000..4e64020
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/icons/I128.png
Binary files differ
diff --git a/data/extensions/LCSP@0xbeef.coffee/icons/I16.png b/data/extensions/LCSP@0xbeef.coffee/icons/I16.png
new file mode 100644
index 0000000..8b86713
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/icons/I16.png
Binary files differ
diff --git a/data/extensions/LCSP@0xbeef.coffee/icons/I48.png b/data/extensions/LCSP@0xbeef.coffee/icons/I48.png
new file mode 100644
index 0000000..9c58786
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/icons/I48.png
Binary files differ
diff --git a/data/extensions/LCSP@0xbeef.coffee/main.js b/data/extensions/LCSP@0xbeef.coffee/main.js
new file mode 100644
index 0000000..8b38e80
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/main.js
@@ -0,0 +1,394 @@
+/*
+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 parseURL(a){
+ let url = new URL(a);
+ var result = Object.create(null);
+ for(let i of url.searchParams) {
+ result[i[0]] = i[1];
+ }
+ return JSON.stringify(result, undefined, 4);
+}
+
+function read_string(a){
+ var ret = "no quotes found.";
+ var flag = false;
+ var ch = "";
+ for(var i = 0; i < a.length; i++){
+ ch = a.charAt(i);
+ if(ch == '"'){
+ if(flag == false){
+ ret = "";
+ flag = true;
+ } else{
+ break;
+ }
+ } else{
+ if(flag == true){
+ ret += ch;
+ }
+ }
+
+ }
+ return ret;
+}
+
+var form = "<div style='margin-left:25%; display:inline-block;'>"+
+ "<input type='text' value='Email'></input><br>"+
+ "<input type='text' value='First Name'></input><br>"+
+ "<input type='text' value='Last Name'></input><br>"+
+ "<input type='text' value='Country (2 letter code)'></input><br>"+
+ "<input type='text' value='City'></input><br>"+
+ "<input type='text' value='State (2 letter code)'></input><br>"+
+ "<input type='text' value= 'Zip'></input><br>"+
+ "<button id='submit_form' onclick='submit_form'>Sign petition</button><br>"
+ "</div>";
+
+// for the newer ones
+
+function submit_form(){
+ console.log("clicked");
+ //document.getElementsByTagName("button")[1].style = "display:none";
+ var this_uid = "";
+ var this_oid = "";
+ var this_aid = "";
+ var this_pid = "";
+ var this_eid = "";
+ var this_etype = "";
+ var msg = "";
+
+ var blocked_scripts = document.getElementsByTagName("script");
+ var a;
+
+ for(var i = 0; i < blocked_scripts.length; i++){
+ if(typeof(blocked_scripts[i].dataset) != "undefined" && blocked_scripts[i].dataset["librejsBlockedSrc"].indexOf("/api/widget/petition/") != -1){
+ a = blocked_scripts[i];
+ break;
+ }
+ }
+
+ var script_url = a.dataset["librejsBlockedSrc"];
+ var http = new XMLHttpRequest();
+ console.log(document.location.host + script_url);
+ http.open("GET","https://"+document.location.host + script_url);
+ http.onload = function(){
+ console.log("response");
+ var i = this.responseText.indexOf("org-");
+ this_oid = this.responseText.substring(i+4,i+40);
+ i = this.responseText.indexOf(".eid= '");
+ this_eid = this.responseText.substring(i+7,i+43);
+ i = this.responseText.indexOf(".aid= '");
+ this_aid = this.responseText.substring(i+7,i+43);
+ i = this.responseText.indexOf(".userInteractionId = '");
+ this_uid = this.responseText.substring(i+22,i+58);
+ i = this.responseText.indexOf(".pid = '");
+ this_pid = this.responseText.substring(i+8,i+44);
+ console.log(this_pid);
+ i = this.responseText.indexOf(".eType= '");
+ var temp = "";
+ var j = 0;
+ while(temp != "'"){
+ j++;
+ temp = this.responseText.charAt(i+8+j);
+ if(temp == "'"){
+ break;
+ }
+ this_etype = this_etype + temp;
+ }
+ var form = document.getElementsByTagName("input");
+ var this_data = {
+ "PersonContact@Email@Value":{
+ "value": form[0].value,
+ "label":"Email Address",
+ "required":true
+ },
+ "PersonCensus@FirstName":{
+ "value": form[1].value,
+ "label":"First Name",
+ "required":true
+ },
+ "PersonCensus@LastName":{
+ "value": form[2].value,
+ "label":"Last Name",
+ "required":true
+ },
+ "Address@Home@Country":{
+ "value":form[3].value,
+ "label":"Country",
+ "required":true
+ },
+ "Address@Home@City":{
+ "value":form[4].value,
+ "label":"City",
+ "required":true
+ },
+ "Address@Home@State":{
+ "value": form[5].value,
+ "label":"State",
+ "required":true
+ },
+ "Address@Home@Zip":{
+ "value":form[6].value,
+ "label":"Zip Code",
+ "required":true
+ },
+ "termsAndConditions":{
+
+ }
+ };
+ var msg = {
+ header : {},
+ payload : {
+ userInteractionId : this_uid,
+ pid : this_pid, // petition ID
+ oid : this_oid, // organization ID
+ aid : this_aid, // action ID
+ cid : "", // appears to be null
+ eid : this_eid, // ???
+ eType : this_etype, // string
+ data : this_data // form data
+ },
+ showComment: true,
+ showSignature: true
+ };
+ console.log(msg);
+ http2 = new XMLHttpRequest();
+ http2.open("POST","https://"+document.location.host+"/api/activity/submission/petition");
+ http2.onload = function(){
+ //document.body.innerHTML += this.responseText;
+ console.log("PETITION SUBMITTED RESPONSE:");
+ var r = JSON.parse(this.responseText);
+ if(r["errors"] == ""){
+ window.alert("[Free Salsa Labs Petitions] \n Petition did not return errors. (Success)");
+ document.getElementsByClassName(" sli-element sli-socialShare sli-horizontal")[0].style.display = "inline";
+ } else{
+ window.alert("[Free Salsa Labs Petitions] \n Petition returned an error:\n" + r["errors"][0] + "\n Please check your information and try again. Note that it may not accept duplicate signatures.");
+ }
+ console.log(r);
+ }
+ http2.setRequestHeader("Content-Type", "application/json; charset=utf-8");
+ console.log("submitting post")
+ http2.send(JSON.stringify(msg));
+ };
+ http.send();
+ return false;
+}
+
+function parseURL(a){
+ let url = new URL(a);
+ var result = Object.create(null);
+ for(let i of url.searchParams) {
+ result[i[0]] = i[1];
+ }
+ //console.log(JSON.stringify(result, undefined, 4));
+ return JSON.stringify(result, undefined, 4);
+}
+function goTo(url) {
+ var a = document.createElement("a");
+ if(!a.click) {
+ location.href = url;
+ return;
+ }
+ a.setAttribute("href", url);
+ a.style.display = "none";
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(a);
+ a.click();
+}
+free_salsa_submit = function( e ){
+ //console.log("\nFORM SUBMITTED\n")
+ var possible_matches = document.getElementById("mainForm").children[0];
+ var url = possible_matches.action;
+ var required_fields = document.getElementsByName("required")[0].value.split(",");
+ var field;
+ var form_good = true;
+ var form_data = {};
+ for(var i = 0; i < required_fields.length; i++){
+ if(document.getElementsByName(required_fields[i])[0] !== undefined){
+ field = document.getElementsByName(required_fields[i])[0];
+ form_data[field.name] = field.value;
+ if(field != ""){
+ console.log(field.value);
+ } else{
+ form_good = false;
+ console.log("[blank]");
+ }
+ }
+ }
+ if(!form_good){
+ return false; // will cause the form not to submit
+ }else{
+ var http = new XMLHttpRequest();
+ http.open('POST', url, true);
+ http.onload = function (){
+ //console.log("URL in response to post:");
+ var redirect = document.body.innerHTML.substr(document.body.innerHTML.indexOf("[URL]")+5);
+ //console.log("before redirect:"+document.referrer);
+ console.log(redirect)
+ //window.location.replace(redirect);
+ window.location.href = redirect;
+ //console.log("after redirect:"+document.referrer);
+ //return;
+
+ };
+ http.send(form_data);
+ return true;
+ }
+}
+console.log("loaded");
+if(typeof(document.getElementsByClassName("salsa actions")[0]) != "undefined" ){
+ // set the onsubmit function of the form to add-on's own free javascript
+ window.alert("[Free Salsa Labs Petitions] \nDetected petition is (probably) supported by Free Salsa Labs Petitions.\n");
+ var possible_matches = document.getElementById("mainForm").children[0];
+ possible_matches.onsubmit = free_salsa_submit;
+}
+
+if(document.location.href.indexOf("salsalabs") != -1){
+
+ function reveal_tag(tag){
+ var elements = document.getElementsByTagName(tag);
+ for(var i = 0; i < elements.length; i++){
+ elements[i].style = "display:true";
+ }
+ }
+ // it isn't gonna reveal any styles or scripts
+ reveal_tag("div");
+ reveal_tag("form");
+ var petition_id;
+ var possible = document.getElementsByClassName("sli-element");
+ for(var i = 0; i < possible.length; i++){
+ if(possible[i].attributes["ignite-activity-type"]){
+ if(possible[i].attributes["ignite-activity-type"].value == "Petition"){
+ petition_id = possible[i].attributes["ignite-activity-id"].value;
+ break;
+ }
+ }
+
+ }
+ var poss = document.getElementsByClassName("sli-element sli-socialShare sli-horizontal").length;
+ // only want to do this on some petitions........
+ if(document.location.href.indexOf("rootsaction") == -1 && poss == 1){
+ window.alert("[Free Salsa Labs Petitions] \nDetected petition is supported by Free Salsa Labs Petitions.\n");
+ document.body.innerHTML += form;
+ document.getElementsByClassName("sli-element sli-socialShare sli-horizontal")[0].style.display = "none";
+ document.getElementsByTagName("button")[0].addEventListener("click",submit_form);
+ } else{
+ window.alert("[Free Salsa Labs Petitions] \nSorry, the detected petition is not supported. \n");
+ }
+}
+
+if(document.location.href.indexOf("dailykos") != -1 || document.location.href.indexOf("actionnetwork") != -1){
+
+ window.alert("[Free Salsa Labs Petitions] \nDetected petition is supported by Free Salsa Labs Petitions.\n");
+
+ var meta = document.getElementsByTagName("meta");
+ var prop = "no property found.";
+
+ var title = "";
+ var desc = "";
+ var imgsrc = "";
+
+ for(var i = 0; i < meta.length; i++){
+
+ if(meta[i].outerHTML.indexOf("property=") != -1){
+ prop = read_string(meta[i].outerHTML.substring(meta[i].outerHTML.indexOf("property="),meta[i].outerHTML.length));
+ if(prop == "og:title"){
+ title = meta[i].content;
+ }
+ if(prop == "og:description"){
+ desc = meta[i].content;
+ }
+
+ if(prop == "og:image"){
+ imgsrc = meta[i].content;
+ }
+
+ }
+ }
+ title = "<h1><b>" + title + "</b></h1><br><br>";
+ //console.log(title);
+ desc = desc.replace(/\n/g, '</br>');
+ //console.log(desc);
+ imgsrc = '<img src="'+imgsrc+'">';
+ //console.log(imgsrc);
+ var qs = JSON.parse(parseURL(document.location.href));
+ //console.log(qs);
+
+ // Where the content is
+ var content = document.getElementsByClassName("container")[0];
+
+ //content.innerHTML = title + imgsrc + "<br><br>"+desc;
+
+ var req = {
+ "clear_id":[true,true], // don't know what these mean
+ "reload":"true",
+ "style":"full",
+ "referrer":qs["email_subject"],
+ "source":qs["source"],
+ "css":"undefined",
+ "_":Date.now() + ""
+ };
+
+ console.log(req);
+ // https://actionnetwork.org/letters/tell-congress-we-need-the-wealthy-and-big-corporations-to-pay-their-fair-share/write
+
+ // URL is where to send the signature once params are built
+ var url = document.location.href;
+ url = url.substring(0,url.indexOf("?"));
+
+ url += "/write";
+ //console.log(url);
+
+
+ // now get the script so we can get form fields from it
+ var script_src = document.getElementsByTagName("script")[2].dataset["librejsBlockedSrc"]; // hope fully doesn't change
+ var default_msg_url = script_src.substr(0,script_src.indexOf("?"));
+ //console.log(default_msg_url);
+ var http = new XMLHttpRequest();
+ http.open("get",script_src);
+ http.onload = function(){
+ //console.log("SCRIPT GET");
+ var find = "place.innerHTML =";
+ var start = this.response.indexOf(find) + find.length;
+ var form = this.response.substr(start,this.response.length);
+ form = form.substr(1,form.indexOf('";'));
+ form = form.replace(/\\n|\\/g, '');
+
+ content.innerHTML += unescape(form);
+
+ };
+
+ if(document.location.href.indexOf("clear_id=true") == -1){
+ //console.log("Remembered person");
+
+ var query = "?format=js&origin=&delivery_id="+qs["delivery_id"]+"&reload=true&style=full";
+
+ var http2 = new XMLHttpRequest();
+ http2.open("get",default_msg_url+query);
+ http2.onload = function(){
+ content.innerHTML = "[Follow up submitted]" + this.response;
+ //console.log(this.response.substr(this.response.indexOf("<textarea"),this.response.indexOf("</textarea>")+"</textarea>".length));
+ };
+ http2.send();
+ } else{
+ //console.log("It isn't the remembered person");
+ http.send(req);
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/extensions/LCSP@0xbeef.coffee/manifest.json b/data/extensions/LCSP@0xbeef.coffee/manifest.json
new file mode 100644
index 0000000..4789180
--- /dev/null
+++ b/data/extensions/LCSP@0xbeef.coffee/manifest.json
@@ -0,0 +1,38 @@
+{
+ "manifest_version": 2,
+ "name": "Free Salsalabs Petitions",
+ "version": "1.3",
+ "author": "Nathan Nichols",
+ "id": "LCSP@0xbeef.coffee",
+ "description": "Free Javascript for submitting Salsalabs petitions.",
+ "icons": {
+ "16": "icons/I16.png",
+ "48": "icons/I48.png",
+ "128": "icons/I128.png"
+ },
+ "applications": {
+ "gecko": {
+ "id": "LCSP@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "permissions": [
+ "webRequest"
+ ],
+ "content_scripts": [
+ {
+ "matches": [
+ "*://actionnetwork.org/letters/*",
+ "*://dailykos.org/*",
+ "*://act.rootsaction.org/*",
+ "*://rootscation.org/*",
+ "*://*.salsalabs.org/*"
+ ],
+ "js": [
+ "main.js"
+ ]
+ }
+ ]
+}
+
+
diff --git a/data/extensions/LibrejsDrive@0xbeef.coffee/License b/data/extensions/LibrejsDrive@0xbeef.coffee/License
new file mode 100644
index 0000000..638bb51
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/License
@@ -0,0 +1,8 @@
+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/LibrejsDrive@0xbeef.coffee/META-INF/manifest.mf b/data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/manifest.mf
new file mode 100644
index 0000000..d9f7b9a
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/manifest.mf
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+
+Name: google_drive.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: duk91DVUHS83P64lVwfamw==
+SHA1-Digest: aM2klujxFOr+bFaD7PXd+izgCCY=
+
+Name: License
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: o1+NLuXuBdXDUPbqMKclVg==
+SHA1-Digest: 9neKP3yy2up5cLrNOoXL0zOPkJY=
+
+Name: manifest.json
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: D+WP8+P9hj/FtW2D973svQ==
+SHA1-Digest: 3zhyX2q4yAi2VAMf6cz213TWDyc=
+
+Name: icons/L4Libre.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: q3yb3JBgG37iwtqsbdifEQ==
+SHA1-Digest: g9xXtW7KmY0kT9CJhiEc24eApUw=
+
+Name: icons/L4Libre128.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: HuOWoeJwSBaX2AjC64b13g==
+SHA1-Digest: FRHLIUgqzDFxwsPz1xEw7LgLwxE=
+
+Name: icons/L4Libre48.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: zmyb8Gjl/pQrCjin3xTqxg==
+SHA1-Digest: BnrBIabVdDHRvAczhVg7e/lVcjc=
+
diff --git a/data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/mozilla.rsa b/data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/mozilla.rsa
new file mode 100644
index 0000000..10a9be8
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/mozilla.rsa
Binary files differ
diff --git a/data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/mozilla.sf b/data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/mozilla.sf
new file mode 100644
index 0000000..5ccff89
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+Signature-Version: 1.0
+MD5-Digest-Manifest: gKo1uIN/QaixjtCXUhIOhg==
+SHA1-Digest-Manifest: uX2UjTidQeTHftLmF3xrE5SM/SE=
+
diff --git a/data/extensions/LibrejsDrive@0xbeef.coffee/google_drive.js b/data/extensions/LibrejsDrive@0xbeef.coffee/google_drive.js
new file mode 100644
index 0000000..be4398c
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/google_drive.js
@@ -0,0 +1,105 @@
+/*
+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 parseURL(a){
+ let url = new URL(a);
+ var result = Object.create(null);
+ for(let i of url.searchParams) {
+ result[i[0]] = i[1];
+ }
+ return JSON.stringify(result, undefined, 4);
+}
+var id;
+var url;
+function form_check(){
+ console.log("boop");
+ var format = "";
+ var input = document.getElementsByTagName("input");
+ if(input[input.length-1].value != "Expected 3 letter file extension"){
+ format = input[input.length-1].value;
+ } else{
+ for(var i = 0; i < input.length-1; i++){
+ if(input[i].value != ""){
+ format = input[i].value;
+ break;
+ }
+ }
+ if(format == ""){
+ return 0;
+ }
+ }
+
+ // Supposed to look like this:
+ // https://docs.google.com/document/export?format=FORMAT&id=ID
+ // Thanks to Alyssa Rosenzweig.
+ var new_url = 'https://docs.google.com/document/export?format='+format+'&id='+id;
+ document.location.assign(new_url);
+ return 0;
+}
+
+
+var contains_apostrophe = "You don't really want to store your data in a cloudy service do you?";
+var opts_form =
+ ' <br>'+
+ ' <h1>Google Drive without non-free Javascript</h1>'+
+ ' '+contains_apostrophe+'<br><br><br>'+
+ ' <div id="opts">'+
+ ' <b>Please select the format to download in:</b><br><br>'+
+ ' <input type="radio" name="format" value="txt"> Plain text ("txt")<br>'+
+ ' <input type="radio" name="format" value="odt"> ODT ("odt")<br><br>'+
+ ' Or try to get the document in a different format, '+
+ ' ("png", "avi", "pdf", etc..):<br><br>'+
+ ' <input type="text" value="Expected 3 letter file extension"><br><br>'+
+ ' <button id="submit">Go fetch the document<br>'+
+ ' </div>'+
+ ''+
+ ''+
+ '';
+
+// see if its a document or not.
+function check_valid(){
+ id = "no ID found.";
+ var url_arr = document.location.href.split("/");
+
+ for(var i = 0; i < url_arr.length-1; i++){
+ if(url_arr[i] == "d"){
+ id = url_arr[i+1];
+ break;
+ }
+ }
+ if(id == "no ID found."){
+ // do nothing because it could be an info page or something
+ console.log("no id found.");
+ return false;
+ }
+ else {
+ return true;
+ }
+}
+
+
+
+function main(){
+ if(check_valid()){
+ console.log("---------------------------------"+Date.now()+":Detected Google Drive."+"---------------------------------");
+ window.stop();
+ document.head.innerHTML = "";
+ document.body.innerHTML = opts_form;
+ document.body.style.textAlign = "center";
+ document.getElementById("opts").style.textAlign = "left";
+ //document.getElementsById("opts").style.float = "left";
+ document.body.style.marginTop = "2%"
+ document.body.style.marginLeft = "25%"
+ document.body.style.marginRight = "25%"
+ document.getElementById("submit").addEventListener("click",form_check);
+ }
+ return 0;
+}
+main();
diff --git a/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre.png b/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre.png
new file mode 100644
index 0000000..216e051
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre.png
Binary files differ
diff --git a/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre128.png b/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre128.png
new file mode 100644
index 0000000..04f8d63
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre128.png
Binary files differ
diff --git a/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre48.png b/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre48.png
new file mode 100644
index 0000000..0470a78
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/icons/L4Libre48.png
Binary files differ
diff --git a/data/extensions/LibrejsDrive@0xbeef.coffee/manifest.json b/data/extensions/LibrejsDrive@0xbeef.coffee/manifest.json
new file mode 100644
index 0000000..0f5141f
--- /dev/null
+++ b/data/extensions/LibrejsDrive@0xbeef.coffee/manifest.json
@@ -0,0 +1,29 @@
+{
+ "manifest_version": 2,
+ "name": "LibreJS Google Drive",
+ "version": "1.0",
+ "author": "Nathan Nichols",
+ "id": "LibrejsDrive@0xbeef.coffee",
+ "description": "Makes Google Drive usable with LibreJS.",
+ "icons": {
+ "16": "icons/L4Libre.png",
+ "48": "icons/L4Libre48.png",
+ "128": "icons/L4Libre128.png"
+ },
+ "applications": {
+ "gecko": {
+ "id": "google_drive@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "content_scripts": [
+ {
+ "matches": [
+ "*://docs.google.com/document/*"
+ ],
+ "js": [
+ "google_drive.js"
+ ]
+ }
+ ]
+}
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/License b/data/extensions/SimpleSumOfUs@0xbeef.coffee/License
new file mode 100644
index 0000000..33e9054
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/License
@@ -0,0 +1,11 @@
+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 THE X CONSORTIUM 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.
+
+Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.
+
+
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/License~ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/License~
new file mode 100644
index 0000000..e66519b
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/License~
@@ -0,0 +1,4 @@
+Copying and distribution of these files, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without any warranty.
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/manifest.mf b/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/manifest.mf
new file mode 100644
index 0000000..52df9bf
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/manifest.mf
@@ -0,0 +1,47 @@
+Manifest-Version: 1.0
+
+Name: background.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: b+hqbG+cxbyn7voEeBC6YA==
+SHA1-Digest: oqG7pr53XAo4O0cYevZ5h+QFm38=
+
+Name: background.js~
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: F9sHiccCOsmqoxeuFpLUpg==
+SHA1-Digest: 8FX8zeZe41n5PYWUZJlGZzw+MhQ=
+
+Name: improve_css.js~
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: SPoSdQ4UV9ha7VtVQr7TSA==
+SHA1-Digest: W/cOPUtvc7xRBqk+xIeaNJB0rgc=
+
+Name: License
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: HgKT6ruZj0xmqNQ4iVMdeA==
+SHA1-Digest: fKv1UikAKfPIRdhcGHC+j0w+Qug=
+
+Name: License~
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: uQsUSQeJ2hGiGWkNJivhZQ==
+SHA1-Digest: MXOhbF9Sh9YFNeRy9ShSaNE2+4U=
+
+Name: main.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: W2QYOY14QJTlytkh9cuE/A==
+SHA1-Digest: uK1t9t+sobDUU63+1CpPGV0xwsk=
+
+Name: main.js~
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: EGCv8OmU0w4fVCaS6JIcwg==
+SHA1-Digest: rN2Va7lolNC+XcwF1GUcs13wrr8=
+
+Name: manifest.json
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: jHQUFJK+JkNiuLvnV2RYGw==
+SHA1-Digest: S/HNg8iRSNhp3L6jxlO1IBL0SMw=
+
+Name: manifest.json~
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: P8fv2KGTLcz/ObrcJPN0sQ==
+SHA1-Digest: ZFEZZb80US6Y7sJkd1uXi/UHu4A=
+
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/mozilla.rsa b/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/mozilla.rsa
new file mode 100644
index 0000000..c6a9cd0
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/mozilla.rsa
Binary files differ
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/mozilla.sf b/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/mozilla.sf
new file mode 100644
index 0000000..1a4861e
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+Signature-Version: 1.0
+MD5-Digest-Manifest: /Am43YphqfZWnNf6ECgM9A==
+SHA1-Digest-Manifest: ddWjaDwQVowyW0xE+V8v/il3Hx4=
+
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/background.js b/data/extensions/SimpleSumOfUs@0xbeef.coffee/background.js
new file mode 100644
index 0000000..cf96c01
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/background.js
@@ -0,0 +1,35 @@
+/*
+
+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 THE X CONSORTIUM 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.
+
+Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.
+
+
+
+*/
+
+
+function redirect(requestDetails) {
+ console.log("Redirecting: " + requestDetails.url);
+ return {
+ redirectUrl: "https://www.sumofus.org/campaigns/"
+ };
+}
+function none(requestDetails) {
+ console.log("none")
+}
+function make_page(requestDetails) {
+
+}
+
+browser.webRequest.onBeforeRequest.addListener(
+ redirect,
+ {urls: ["http://www.sumofus.org/"]},
+ ["blocking"]
+);
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/background.js~ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/background.js~
new file mode 100644
index 0000000..da8b5d3
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/background.js~
@@ -0,0 +1,37 @@
+/*
+
+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 THE X CONSORTIUM 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.
+
+Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.
+
+
+
+*/
+
+
+function redirect(requestDetails) {
+ console.log("Redirecting: " + requestDetails.url);
+ return {
+ redirectUrl: "https://www.sumofus.org/campaigns/"
+ };
+}
+function none(requestDetails) {
+ console.log("none")
+}
+function make_page(requestDetails) {
+
+ console.log("\n\n\nmakin page\n\n\n")
+
+}
+
+browser.webRequest.onBeforeRequest.addListener(
+ redirect,
+ {urls: ["http://www.sumofus.org/"]},
+ ["blocking"]
+);
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/improve_css.js~ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/improve_css.js~
new file mode 100644
index 0000000..6df0af4
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/improve_css.js~
@@ -0,0 +1,24 @@
+/*
+
+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 THE X CONSORTIUM 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.
+
+Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.
+*/
+
+function wildcard_match(str, rule) {
+ return new RegExp("^" + rule.split("*").join(".*") + "$").test(str);
+}
+
+var page = window.location.href;
+var style = {"text-indent": "50px;","text-align": "left;","color": "black;","font-size": "12pt;"}
+
+if( wildcard_match(page,"*://*actions.sumofus.org/a/*") ){
+ document.getElementsByClassName("body-text main-feature")[0].style = style;
+ document.body.style.display = style;
+}
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/main.js b/data/extensions/SimpleSumOfUs@0xbeef.coffee/main.js
new file mode 100644
index 0000000..25848a4
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/main.js
@@ -0,0 +1,87 @@
+/*
+
+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 THE X CONSORTIUM 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.
+
+Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.
+
+
+
+*/
+
+function wildcard_match(str, rule) {
+ return new RegExp("^" + rule.split("*").join(".*") + "$").test(str);
+}
+
+var page = window.location.href;
+/*
+if( wildcard_match(document.getElementsByTagName("pre")[0].innerHTML,'{"follow_up_url":"*"}') ){
+ console.log(JSON.parse(document.getElementsByTagName("pre")[0].innerHTML)["follow_up_url"]);
+}
+*/
+
+var style = "div { top: 5%; margin-left: 10%; margin-right: 10%; background-color: white;}"
+var sheet = document.createElement('style');
+sheet.innerHTML = style;
+document.body.appendChild(sheet);
+if( wildcard_match(page,"*://*actions.sumofus.org/api/pages/*/actions") ){
+ //console.log("Redirecting...");
+ var link = document.body.innerText;
+ link = JSON.parse(link);
+ //console.log(link);
+ document.body.innerHTML = "<h1>You have submitted this petition.</h1>";
+}
+
+if( wildcard_match(page,"*://*actions.sumofus.org/a/*") ){
+ console.log("hello");
+ // because I noticed there were two of these for some reason
+ document.getElementsByTagName("button")[1].remove();
+ document.getElementsByTagName("span")[0].innerHTML = "";
+ var divs = document.getElementsByTagName("div");
+
+ document.getElementsByClassName("noscript-notice")[0].remove();
+
+ // If they change the HTML of the page this might break...
+ document.getElementsByClassName("petition-bar__content")[0].children[1].children[1].innerHTML = "";
+
+ for ( i=0; i<document.styleSheets.length; i++) {
+ void(document.styleSheets.item(i).disabled=true);
+ }
+ // apply some basic CSS to make it a bit prettier
+ var style = "div {margin: 50px; text-align: left; color: black; font-size: 12pt;}";
+ var sheet = document.createElement('style');
+ sheet.innerHTML = style;
+ document.body.appendChild(sheet);
+} else{
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function() {
+ if(this["readyState"] == 4 && this["status"] == 200){
+ var campaigns = JSON.parse(this.responseText);
+ //console.log(campaigns);
+ var s = "";
+ var number = "";
+ //html_template += '<button onclick="">Show Pictures</button><br>';
+ for(var i = 0; i < campaigns.length; i += 1){
+ number = (i+1)+"/"+campaigns.length+":";
+ s = campaigns[i]["title"]+"<br>";
+ html_template += number.link(campaigns[i]["url"])+s;
+ html_template += "<img src="+'"'+campaigns[i]["image"]+'"'+"><br>";
+ }
+ document.body.innerHTML = html_template;
+ }
+ };
+
+ var html_template = "<h1>[Simple SumOfUs.org]</h1>";
+ // URL to get campaigns
+ var url = "http://actions.sumofus.org/api/pages/featured.json?language=en";
+
+ document.head.replaceWith("");
+ document.body.innerHTML = "";
+ xhr.open("GET", url);
+ xhr.send();
+}
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/main.js~ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/main.js~
new file mode 100644
index 0000000..84ed786
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/main.js~
@@ -0,0 +1,86 @@
+/*
+
+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 THE X CONSORTIUM 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.
+
+Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.
+
+
+
+*/
+
+function wildcard_match(str, rule) {
+ return new RegExp("^" + rule.split("*").join(".*") + "$").test(str);
+}
+
+var page = window.location.href;
+/*
+if( wildcard_match(document.getElementsByTagName("pre")[0].innerHTML,'{"follow_up_url":"*"}') ){
+ console.log(JSON.parse(document.getElementsByTagName("pre")[0].innerHTML)["follow_up_url"]);
+}
+*/
+
+var style = "div { top: 5%; margin-left: 10%; margin-right: 10%; background-color: white;}"
+var sheet = document.createElement('style');
+sheet.innerHTML = style;
+document.body.appendChild(sheet);
+if( wildcard_match(page,"*://*actions.sumofus.org/api/pages/*/actions") ){
+ //console.log("Redirecting...");
+ var link = document.body.innerText;
+ link = JSON.parse(link);
+ //console.log(link);
+ document.body.innerHTML = "<h1>You have submitted this petition.</h1>";
+}
+
+if( wildcard_match(page,"*://*actions.sumofus.org/a/*") ){
+ console.log("hello");
+ // because I noticed there were two of these for some reason
+ document.getElementsByTagName("button")[1].remove();
+ document.getElementsByTagName("span")[0].innerHTML = "";
+ var divs = document.getElementsByTagName("div");
+
+ document.getElementsByClassName("noscript-notice")[0].remove();
+
+ // If they change the HTML of the page this might break...
+ document.getElementsByClassName("petition-bar__content")[0].children[1].children[1].innerHTML = "";
+ for(var i = 0; i < document.styleSheets.length; i++){
+ document.styleSheets[i].disabled = true;
+ }
+ // apply some basic CSS to make it a bit prettier
+ var style = "div {margin: 50px; text-align: left; color: black; font-size: 12pt;}";
+ var sheet = document.createElement('style');
+ sheet.innerHTML = style;
+ document.body.appendChild(sheet);
+} else{
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function() {
+ if(this["readyState"] == 4 && this["status"] == 200){
+ var campaigns = JSON.parse(this.responseText);
+ //console.log(campaigns);
+ var s = "";
+ var number = "";
+ //html_template += '<button onclick="">Show Pictures</button><br>';
+ for(var i = 0; i < campaigns.length; i += 1){
+ number = (i+1)+"/"+campaigns.length+":";
+ s = campaigns[i]["title"]+"<br>";
+ html_template += number.link(campaigns[i]["url"])+s;
+ html_template += "<img src="+'"'+campaigns[i]["image"]+'"'+"><br>";
+ }
+ document.body.innerHTML = html_template;
+ }
+ };
+
+ var html_template = "<h1>[Simple SumOfUs.org]</h1>";
+ // URL to get campaigns
+ var url = "http://actions.sumofus.org/api/pages/featured.json?language=en";
+
+ document.head.replaceWith("");
+ document.body.innerHTML = "";
+ xhr.open("GET", url);
+ xhr.send();
+}
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/manifest.json b/data/extensions/SimpleSumOfUs@0xbeef.coffee/manifest.json
new file mode 100644
index 0000000..3dae004
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/manifest.json
@@ -0,0 +1,35 @@
+{
+ "manifest_version": 2,
+ "name": "LibreJS compatible SumOfUs.org",
+ "version": "1.0",
+ "author": "Nathan Nichols",
+ "description": "Makes sumofus.org compatible with LibreJS.",
+ "applications": {
+ "gecko": {
+ "id": "SimpleSumOfUs@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "permissions": [
+ "webRequestBlocking",
+ "*://*.sumofus.org/*",
+ "*://*.actions.sumofus.org/*",
+ "webRequest"
+ ],
+
+ "background": {
+ "scripts": ["background.js"]
+ },
+ "content_scripts": [
+ {
+ "matches": [
+ "https://www.sumofus.org/campaigns/*",
+ "*://*.actions.sumofus.org/a/*",
+ "*://*.actions.sumofus.org/api/pages/*/actions"
+ ],
+ "js": [
+ "main.js"
+ ]
+ }
+ ]
+}
diff --git a/data/extensions/SimpleSumOfUs@0xbeef.coffee/manifest.json~ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/manifest.json~
new file mode 100644
index 0000000..b9de36f
--- /dev/null
+++ b/data/extensions/SimpleSumOfUs@0xbeef.coffee/manifest.json~
@@ -0,0 +1,36 @@
+{
+ "manifest_version": 2,
+ "name": "LibreJS compatible SumOfUs.org",
+ "version": "1.0",
+ "author": "Nathan Nichols",
+ "id": "SimpleSumOfUs@0xbeef.coffee",
+ "description": "Makes sumofus.org compatible with LibreJS.",
+ "applications": {
+ "gecko": {
+ "id": "SimpleSumOfUs@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "permissions": [
+ "webRequestBlocking",
+ "*://*.sumofus.org/*",
+ "*://*.actions.sumofus.org/*",
+ "webRequest"
+ ],
+
+ "background": {
+ "scripts": ["background.js"]
+ },
+ "content_scripts": [
+ {
+ "matches": [
+ "https://www.sumofus.org/campaigns/*",
+ "*://*.actions.sumofus.org/a/*",
+ "*://*.actions.sumofus.org/api/pages/*/actions"
+ ],
+ "js": [
+ "main.js"
+ ]
+ }
+ ]
+}
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
+ }
+}
+
diff --git a/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/manifest.mf b/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/manifest.mf
new file mode 100644
index 0000000..c53c9e6
--- /dev/null
+++ b/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/manifest.mf
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+
+Name: manifest.json
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: RD/oJJA6mlJUtFyZwDJtpg==
+SHA1-Digest: sMxggkMZE7UH2P/dCW4spBB78LI=
+
+Name: mcdonalds_wifi.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: uRpiX8useo4n06+tSsvdLg==
+SHA1-Digest: aPDLrsOOC12l9G1FmwtlBTwHLBA=
+
+Name: icons/L4Libre.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: soWYd1Ug8BQKF1PWpoS2jQ==
+SHA1-Digest: QpNjRX2sdfAnd8192xkX1LeuoRw=
+
+Name: icons/L4Libre128.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: SIHfXuJzvqakxTnsp76DyQ==
+SHA1-Digest: Y6TfpPAVOlilMjPdKSSakSzTKlY=
+
+Name: icons/L4Libre48.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: 22Kfe3M2hTOu6/kcSU8wew==
+SHA1-Digest: AkkqntzbVrpWlRdfoMpFUOHKD8w=
+
diff --git a/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/mozilla.rsa b/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/mozilla.rsa
new file mode 100644
index 0000000..519909e
--- /dev/null
+++ b/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/mozilla.rsa
Binary files differ
diff --git a/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/mozilla.sf b/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/mozilla.sf
new file mode 100644
index 0000000..1ebab1c
--- /dev/null
+++ b/data/extensions/rnrMcDonalds@0xbeef.coffee/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+Signature-Version: 1.0
+MD5-Digest-Manifest: MPdkckEiqLFjXIQ4LsCYWg==
+SHA1-Digest-Manifest: UTgGd3Hr4Buxn/phnoT41MMd73c=
+
diff --git a/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre.png b/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre.png
new file mode 100644
index 0000000..ed0dac1
--- /dev/null
+++ b/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre.png
Binary files differ
diff --git a/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre128.png b/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre128.png
new file mode 100644
index 0000000..b6d56f1
--- /dev/null
+++ b/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre128.png
Binary files differ
diff --git a/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre48.png b/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre48.png
new file mode 100644
index 0000000..2628bb3
--- /dev/null
+++ b/data/extensions/rnrMcDonalds@0xbeef.coffee/icons/L4Libre48.png
Binary files differ
diff --git a/data/extensions/rnrMcDonalds@0xbeef.coffee/manifest.json b/data/extensions/rnrMcDonalds@0xbeef.coffee/manifest.json
new file mode 100644
index 0000000..74ed10f
--- /dev/null
+++ b/data/extensions/rnrMcDonalds@0xbeef.coffee/manifest.json
@@ -0,0 +1,29 @@
+{
+ "manifest_version": 2,
+ "name": "Rock and Roll McDonald's",
+ "version": "1.0",
+ "author": "Nathan Nichols",
+ "id": "rnrMcDonalds@0xbeef.coffee",
+ "description": "Makes free Wi-fi at McDonald's compatible with LibreJS.",
+ "icons": {
+ "16": "icons/L4Libre.png",
+ "48": "icons/L4Libre48.png",
+ "128": "icons/L4Libre128.png"
+ },
+ "applications": {
+ "gecko": {
+ "id": "rnrMcDonalds@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "content_scripts": [
+ {
+ "matches": [
+ "*://*.wayport.net/*"
+ ],
+ "js": [
+ "mcdonalds_wifi.js"
+ ]
+ }
+ ]
+}
diff --git a/data/extensions/rnrMcDonalds@0xbeef.coffee/mcdonalds_wifi.js b/data/extensions/rnrMcDonalds@0xbeef.coffee/mcdonalds_wifi.js
new file mode 100644
index 0000000..6b47999
--- /dev/null
+++ b/data/extensions/rnrMcDonalds@0xbeef.coffee/mcdonalds_wifi.js
@@ -0,0 +1,43 @@
+//http://nmd.mcd12632.msp.wayport.net/index.adp?MacAddr=E0%3a06%3aE6%3a68%3aAF%3a55&IpAddr=192.168.5.94&Ip6Addr=&vsgpId=&vsgId=75381&UserAgent=&ProxyHost=&TunnelIfId=174423&VlanId=20&origDest=http%3a%2f%2fhttpstat.us%2f
+
+console.log("Rock and roll McDonalds detected the McDonald's captive portal.")
+var form = document.getElementsByTagName("form");
+var entries = form[0].getElementsByTagName("input");
+var data = new FormData();
+captive_portal_url = "wayport.net"
+if ("undefined" === typeof(document.getElementsByTagName("form")[0].action)) {
+ console.log("no form found.")
+} else{
+ document.body.style.border = "5px solid red";
+ post_url = document.getElementsByTagName("form")[0].action;
+ var dest = "";
+ for(var i = 0; i < entries.length; i++){
+ console.log(entries[i].name + ":" + entries[i].value);
+
+ if(entries[i].name == "origDest"){
+ dest = entries[i].name;
+ entries[i].value = "http://www.wikipedia.org";
+ }
+ // Seems like this should be set to 1, not sure if required though
+ if(entries[i].name == "connect"){
+ entries[i].value = "1";
+ }
+
+ data.append(entries[i].name,entries[i].value);
+
+ }
+ var http = new XMLHttpRequest();
+ //auth_url = document.URL.substring(0,document.URL.indexOf(captive_portal_url)+captive_portal_url.length);
+ //auth_url += post_url;
+ console.log(data);
+ console.log(post_url);
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', post_url, true);
+ xhr.onload = function () {
+ // do something to response
+ console.log(this.responseText);
+ document.body = this.responseText;
+ };
+ xhr.send(data);
+ alert("[Rock and Roll McDonalds]: Authenticated to McDonald's Wi-fi.")
+}
diff --git a/data/extensions/rsf@0xbeef.coffee/License b/data/extensions/rsf@0xbeef.coffee/License
new file mode 100644
index 0000000..638bb51
--- /dev/null
+++ b/data/extensions/rsf@0xbeef.coffee/License
@@ -0,0 +1,8 @@
+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/rsf@0xbeef.coffee/META-INF/manifest.mf b/data/extensions/rsf@0xbeef.coffee/META-INF/manifest.mf
new file mode 100644
index 0000000..71601c5
--- /dev/null
+++ b/data/extensions/rsf@0xbeef.coffee/META-INF/manifest.mf
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+
+Name: License
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: o1+NLuXuBdXDUPbqMKclVg==
+SHA1-Digest: 9neKP3yy2up5cLrNOoXL0zOPkJY=
+
+Name: manifest.json
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: b7IPx7VDj2bcYY2wP5Oarg==
+SHA1-Digest: fosZdJ2QQjgMcYXVecf5Ei+gHjw=
+
+Name: rsf.js
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: 7G1QyNL+jjIzL6nurHRvDQ==
+SHA1-Digest: 06vXb9tjWgGGs5ltRO58Va/opws=
+
+Name: icons/L4Libre128.png
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: kS1d+qdXiSrLxP7VDwMeHA==
+SHA1-Digest: azirjfdr0IxCBd0hp0U9qA7wM2E=
+
diff --git a/data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.rsa b/data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.rsa
new file mode 100644
index 0000000..181024a
--- /dev/null
+++ b/data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.rsa
Binary files differ
diff --git a/data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.sf b/data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.sf
new file mode 100644
index 0000000..77d865a
--- /dev/null
+++ b/data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.sf
@@ -0,0 +1,4 @@
+Signature-Version: 1.0
+MD5-Digest-Manifest: V1imAEDuWsBsSROAGdix6A==
+SHA1-Digest-Manifest: 0zL+nGOs4UYMjGRyDtpRec0aJYo=
+
diff --git a/data/extensions/rsf@0xbeef.coffee/icons/L4Libre128.png b/data/extensions/rsf@0xbeef.coffee/icons/L4Libre128.png
new file mode 100644
index 0000000..d133c53
--- /dev/null
+++ b/data/extensions/rsf@0xbeef.coffee/icons/L4Libre128.png
Binary files differ
diff --git a/data/extensions/rsf@0xbeef.coffee/manifest.json b/data/extensions/rsf@0xbeef.coffee/manifest.json
new file mode 100644
index 0000000..d77f705
--- /dev/null
+++ b/data/extensions/rsf@0xbeef.coffee/manifest.json
@@ -0,0 +1,28 @@
+{
+ "manifest_version": 2,
+ "name": "Sign RSF.org petitions with free Javascript",
+ "version": "1.1",
+ "author": "Nathan Nichols",
+ "id": "rsf@0xbeef.coffee",
+ "description": "Allows you to sign rsf.org petitions with free Javascript.",
+ "icons": {
+ "128": "icons/L4Libre128.png"
+ },
+ "applications": {
+ "gecko": {
+ "id": "rsf@0xbeef.coffee",
+ "strict_min_version": "42.0"
+ }
+ },
+ "content_scripts": [
+ {
+ "matches": [
+ "*://rsf.org/*",
+ "*://rsf.secure.force.com/*"
+ ],
+ "js": [
+ "rsf.js"
+ ]
+ }
+ ]
+}
diff --git a/data/extensions/rsf@0xbeef.coffee/rsf.js b/data/extensions/rsf@0xbeef.coffee/rsf.js
new file mode 100644
index 0000000..2c5eeab
--- /dev/null
+++ b/data/extensions/rsf@0xbeef.coffee/rsf.js
@@ -0,0 +1,32 @@
+/*
+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 broken_page(){
+ if(document.getElementsByClassName("col-md-4 petition-wrap")[0] === undefined){
+ return 0;
+ }
+ var iframe_src = document.getElementsByTagName("iframe")[0].src.replace(/[\s\S]+%20/g,"");
+ document.getElementsByClassName("col-md-4 petition-wrap")[0].insertAdjacentHTML("afterbegin",'<h2 style="background-color: #00ffff;"><a href="'+iframe_src+'">Click here to sign the petition</a><h2>');
+ document.getElementsByTagName("iframe")[0].remove();
+}
+
+function petition_page(){
+ document.getElementsByTagName("form")[0].insertAdjacentHTML("beforeend",document.getElementById("ajax-view-state-page-container").innerHTML);
+ console.log("inserted info");
+}
+
+if(document.location.href.match("rsf.secure.force.com/petition") !== null){
+ console.log("petition");// the page in the iframe
+ petition_page();
+} else{
+ console.log("other page");
+ broken_page();// the one with the iframe that is a 404
+}
+
diff --git a/data/update-extensions.sh b/data/update-extensions.sh
new file mode 100644
index 0000000..c1048dc
--- /dev/null
+++ b/data/update-extensions.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+for extension in 827475 821614 808959 821609 837436 821607 830681 823216; do
+
+rm -rf /tmp/update-extension
+mkdir /tmp/update-extension
+(cd /tmp/update-extension
+wget -O extension.xpi https://addons.mozilla.org/firefox/downloads/latest/$extension/addon-$extension-latest.xpi
+unzip extension.xpi
+rm extension.xpi)
+
+
+if [ -f /tmp/update-extension/install.rdf ]; then
+ID=$(grep em:id /tmp/update-extension/install.rdf |sed 's/.*<em:id>//; s/<.*//' |head -n1)
+fi
+if [ -f /tmp/update-extension/manifest.json ]; then
+ID=$(grep '"id":' /tmp/update-extension/manifest.json |head -n1|cut -d \" -f 4)
+fi
+
+rm -rf extensions/$ID
+mv /tmp/update-extension extensions/$ID
+
+done