summaryrefslogtreecommitdiff
path: root/data/extensions/SubmitMe@0xbeef.coffee
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@trisquel.info>2022-09-08 20:18:54 -0400
committerRuben Rodriguez <ruben@trisquel.info>2022-09-08 20:18:54 -0400
commit5da28b0f8771834ae208d61431d632875e9f8e7d (patch)
tree688ecaff26197bad8abde617b4947b11d617309e /data/extensions/SubmitMe@0xbeef.coffee
parent4a87716686104266a9cccc2d83cc249e312f3673 (diff)
Updated extensions:
* Upgraded Privacy Redirect to 1.1.49 and configured to use the 10 most reliable invidious instances * Removed ViewTube * Added torproxy@icecat.gnu based on 'Proxy toggle' extension * Added jShelter 0.11.1 * Upgraded LibreJS to 7.21.0 * Upgraded HTTPS Everywhere to 2021.7.13 * Upgraded SubmitMe to 1.9
Diffstat (limited to 'data/extensions/SubmitMe@0xbeef.coffee')
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/background.js24
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/manifest.json16
-rw-r--r--data/extensions/SubmitMe@0xbeef.coffee/passive_improve_css.js2
3 files changed, 14 insertions, 28 deletions
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/background.js b/data/extensions/SubmitMe@0xbeef.coffee/background.js
index e6403ef..7e8212a 100644
--- a/data/extensions/SubmitMe@0xbeef.coffee/background.js
+++ b/data/extensions/SubmitMe@0xbeef.coffee/background.js
@@ -1,5 +1,6 @@
/*
Copyright (C) 2017 Nathan Nichols
+Copyright (C) 2022 Ruben Rodriguez <ruben@gnu.org>
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:
@@ -32,6 +33,11 @@ function display_single_form(){
};
browser.contextMenus.create({
+ id: "passive-submit-me-css",
+ title: "Reveal hidden elements",
+ contexts: ["all"]
+});
+browser.contextMenus.create({
id: "submit-me",
title: "Force submit a form",
contexts: ["all"]
@@ -41,7 +47,6 @@ browser.contextMenus.create({
title: "Manually choose a form to submit",
contexts: ["all"]
});
-
browser.contextMenus.create({
id: "submit-me-css",
title: "Remove all CSS (Try this if the website is scrambled)",
@@ -51,7 +56,7 @@ browser.contextMenus.create({
function display_manual_dialog(){
function onExecuted(result) {
console.log("manual.js executed.");
- not_executing = true;
+ not_executing = true;
}
function onError(error) {
@@ -68,7 +73,7 @@ function display_manual_dialog(){
function passive_fix_css(){
function onExecuted(result) {
console.log("passive_improve_css.js executed.");
- //not_executing = true;
+ not_executing = true;
}
function onError(error) {
@@ -120,14 +125,6 @@ function input(message){
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);
@@ -140,9 +137,12 @@ browser.contextMenus.onClicked.addListener(function(info, tab) {
not_executing = false;
fix_css();
}
+ if(info.menuItemId == "passive-submit-me-css" && not_executing){
+ not_executing = false;
+ passive_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.");
diff --git a/data/extensions/SubmitMe@0xbeef.coffee/manifest.json b/data/extensions/SubmitMe@0xbeef.coffee/manifest.json
index ac4b604..386ec4e 100644
--- a/data/extensions/SubmitMe@0xbeef.coffee/manifest.json
+++ b/data/extensions/SubmitMe@0xbeef.coffee/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Reveal hidden HTML",
- "version": "1.6",
+ "version": "1.9",
"author": "Nathan Nichols",
"description": "Unhides hidden HTML. Also, has a tool that fixes some websites with broken form validation Javascript by forcing an HTTP post.",
"applications": {
@@ -20,20 +20,6 @@
"activeTab",
"notifications"
],
- "content_scripts": [
- {
- "matches": ["<all_urls>"],
- "js": ["passive_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/passive_improve_css.js b/data/extensions/SubmitMe@0xbeef.coffee/passive_improve_css.js
index 7692990..5a32fe4 100644
--- a/data/extensions/SubmitMe@0xbeef.coffee/passive_improve_css.js
+++ b/data/extensions/SubmitMe@0xbeef.coffee/passive_improve_css.js
@@ -41,7 +41,7 @@ function reveal_css(){
}
}
- if(bad.length > 0 && window.confirm("Hidden HTML detected, would you like to reveal it?")){
+ if(bad.length > 0){
for(var i = 0; i < bad.length; i++){
bad[i].remove();
}