From 7dd172c9e03423c7f8f31cae3cbd114b6f4a9ffe Mon Sep 17 00:00:00 2001
From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com>
Date: Tue, 26 Mar 2024 17:31:50 +0100
Subject: [PATCH] Update custom sites (search)
---
background.js | 2 ++
changelog.txt | 1 +
contentScript.js | 7 ++++---
custom/manifest.json | 2 +-
manifest.json | 2 +-
options/options_custom.html | 3 ++-
options/options_custom.js | 25 +++++++++++++++++++++++++
7 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/background.js b/background.js
index 227c368e..35217ff5 100644
--- a/background.js
+++ b/background.js
@@ -1604,6 +1604,8 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
let article_new = doc.querySelector(message.data.selector_source);
if (article_new)
html = article_new.outerHTML;
+ else
+ html = '';
}
}
message.data.html = html;
diff --git a/changelog.txt b/changelog.txt
index 57c0a59a..513fcbed 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release
Add Ringier Axel Springer Polska
+Update custom sites (search)
* v3.6.1.0 (2024-03-24)
Add Blick.ch (Ringier Gruppe)
diff --git a/contentScript.js b/contentScript.js
index 85754918..d5994e7a 100644
--- a/contentScript.js
+++ b/contentScript.js
@@ -6561,6 +6561,7 @@ function getSelectorLevel(selector) {
function replaceDomElementExtSrc(url, url_src, html, proxy, base64, selector, text_fail = '', selector_source = selector, selector_archive = selector) {
let article = document.querySelector(selector);
+ let no_content_msg = ' | no article content found! | :';
if (html) {
if (!proxy && base64) {
html = decode_utf8(atob(html));
@@ -6604,10 +6605,10 @@ function replaceDomElementExtSrc(url, url_src, html, proxy, base64, selector, te
}, 200);
}
} else
- replaceTextFail(url, article, proxy, text_fail);
+ replaceTextFail(url, article, proxy, text_fail.replace(':', no_content_msg));
}, 200);
} else {
- replaceTextFail(url, article, proxy, text_fail);
+ replaceTextFail(url, article, proxy, url_src ? text_fail.replace(':', no_content_msg) : text_fail);
}
}
@@ -6618,7 +6619,7 @@ function replaceTextFail(url, article, proxy, text_fail) {
text_fail_div.appendChild(document.createTextNode(text_fail));
if (proxy) {
if (url.startsWith('https://archive.')) {
- text_fail_div = archiveLink(url.replace(/^https:\/\/archive\.\w{2}\//, ''));
+ text_fail_div = archiveLink(url.replace(/^https:\/\/archive\.\w{2}\//, ''), text_fail);
} else {
let a_link = document.createElement('a');
a_link.innerText = url;
diff --git a/custom/manifest.json b/custom/manifest.json
index 2247b972..67333b67 100644
--- a/custom/manifest.json
+++ b/custom/manifest.json
@@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
- "version": "3.6.1.1"
+ "version": "3.6.1.2"
}
diff --git a/manifest.json b/manifest.json
index 337b75d6..9e33df8e 100644
--- a/manifest.json
+++ b/manifest.json
@@ -867,5 +867,5 @@
"*://archive.vn/*",
"*://webcache.googleusercontent.com/*"
],
- "version": "3.6.1.1"
+ "version": "3.6.1.2"
}
diff --git a/options/options_custom.html b/options/options_custom.html
index 0bbc25c7..2b009441 100644
--- a/options/options_custom.html
+++ b/options/options_custom.html
@@ -38,7 +38,8 @@
-
+
+
permissions granted (for all in custom list + updated):