summaryrefslogtreecommitdiff
path: root/data/extensions/DMCAreg@0xbeef.coffee/pay.js
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2018-02-25 20:04:31 -0500
committerRuben Rodriguez <ruben@gnu.org>2018-02-25 20:04:31 -0500
commit229240370f009a7ba1dc31f57bcfcbd2cf785d0a (patch)
treedefa51219f44d19451bbcfd1e8298eadb1e3f4b7 /data/extensions/DMCAreg@0xbeef.coffee/pay.js
parentf2a3be07039056c76e3ca4e6040ec900ba64f376 (diff)
Updated extensions
- HTTPS Everywhere updated to 2018.1.11 - "goteo.org payments with free JS" updated to 1.1 - "LibreJS compatible Pay.gov" updated to 1.3 - "Reveal hidden HTML" updated to 1.6 - Enabled WebRTC, but prevent leaking the LAN ip.
Diffstat (limited to 'data/extensions/DMCAreg@0xbeef.coffee/pay.js')
-rw-r--r--data/extensions/DMCAreg@0xbeef.coffee/pay.js48
1 files changed, 47 insertions, 1 deletions
diff --git a/data/extensions/DMCAreg@0xbeef.coffee/pay.js b/data/extensions/DMCAreg@0xbeef.coffee/pay.js
index c56d745..7f5fb80 100644
--- a/data/extensions/DMCAreg@0xbeef.coffee/pay.js
+++ b/data/extensions/DMCAreg@0xbeef.coffee/pay.js
@@ -7,12 +7,58 @@ The above copyright notice and this permission notice shall be included in all c
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("pay.js");
+
+function get_domain(url){
+ var domain = url.replace('http://','').replace('https://','').split(/[/?#]/)[0];
+ if(url.indexOf("http://") == 0){
+ domain = "http://" + domain;
+ }
+ else if(url.indexOf("https://") == 0){
+ domain = "https://" + domain;
+ }
+ domain = domain + "/";
+ domain = domain.replace(/ /g,"");
+ return domain;
+}
if(document.location.href.indexOf("pay.gov/tcsonline/") != -1){
- console.log("detected paymeny page.");
+ document.getElementsByClassName("text")[0].remove();
+ console.log("detected payment page.");
+
+ if( document.getElementsByClassName("redbuttontext") !== null){
+ document.getElementsByClassName("redbuttontext")[0].remove();
+ }
+
document.getElementById("hiddenContinueButton").style.display = "";
document.getElementById("statesCAN").remove();
document.getElementById("statesUSA").remove();
document.getElementById("stateText").value = "2 letter code";
}
+
+if(get_domain(document.location.href) == "https://dmca.copyright.gov/"){
+ console.log("here");
+ document.body.style.display = true;
+
+
+ var form = document.getElementById("file");
+ if(form !== null){
+ console.log("upload page detected");
+ document.getElementById("btnUpload").disabled = false;
+ }
+}
+
+var content;
+function replace_regex(){
+ content = document.documentElement.innerHTML;
+ 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>";
+}
+
+if(window.getComputedStyle(document.body)["display"] == "none"){
+ replace_regex();
+}
+