From 43d2827eeedaf72acbe8eb4c0853eaae272c49f7 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Fri, 1 Sep 2017 16:42:12 -0400 Subject: Added extension collection https://addons.mozilla.org/en-US/firefox/collections/NateN1222/librejs-compatibility-add-ons/ --- data/extensions/rsf@0xbeef.coffee/License | 8 ++++++ .../rsf@0xbeef.coffee/META-INF/manifest.mf | 22 ++++++++++++++ .../rsf@0xbeef.coffee/META-INF/mozilla.rsa | Bin 0 -> 4174 bytes .../rsf@0xbeef.coffee/META-INF/mozilla.sf | 4 +++ .../rsf@0xbeef.coffee/icons/L4Libre128.png | Bin 0 -> 867 bytes data/extensions/rsf@0xbeef.coffee/manifest.json | 28 ++++++++++++++++++ data/extensions/rsf@0xbeef.coffee/rsf.js | 32 +++++++++++++++++++++ 7 files changed, 94 insertions(+) create mode 100644 data/extensions/rsf@0xbeef.coffee/License create mode 100644 data/extensions/rsf@0xbeef.coffee/META-INF/manifest.mf create mode 100644 data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.rsa create mode 100644 data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.sf create mode 100644 data/extensions/rsf@0xbeef.coffee/icons/L4Libre128.png create mode 100644 data/extensions/rsf@0xbeef.coffee/manifest.json create mode 100644 data/extensions/rsf@0xbeef.coffee/rsf.js (limited to 'data/extensions/rsf@0xbeef.coffee') 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 Binary files /dev/null and b/data/extensions/rsf@0xbeef.coffee/META-INF/mozilla.rsa 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 Binary files /dev/null and b/data/extensions/rsf@0xbeef.coffee/icons/L4Libre128.png 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",'

Click here to sign the petition

'); + 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 +} + -- cgit v1.2.3