diff --git a/addons/code/bcma/cf.js b/addons/code/bcma/cf.js
index e6ed1ab3..edbaa504 100644
--- a/addons/code/bcma/cf.js
+++ b/addons/code/bcma/cf.js
@@ -1198,7 +1198,7 @@ browser.webRequest.onHeadersReceived.addListener(function (wr) {
if (my_action == 4) {
tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname);
return {
- redirectUrl: my_customurl.replace('%%URL%%', wr.url)
+ redirectUrl: my_customurl.replace('%%URL%%', wr.url).replace('%%ERL%%', encodeURIComponent(wr.url))
};
}
}
@@ -1259,7 +1259,7 @@ browser.webRequest.onBeforeRequest.addListener(function (wr) {
if (my_action == 4) {
tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname);
return {
- redirectUrl: my_customurl.replace('%%URL%%', wr.url)
+ redirectUrl: my_customurl.replace('%%URL%%', wr.url).replace('%%ERL%%', encodeURIComponent(wr.url))
};
}
}
@@ -1341,7 +1341,7 @@ browser.runtime.onMessage.addListener(function (a, b, c) {
});
}
if (a[0] == 'au') {
- my_customurl = (/^http(|s):\/\/([a-z0-9.-]{4,})\/(.*)%%URL%%(.*)$/.test(a[1])) ? a[1] : def_customurl;
+ my_customurl = (/^http(|s):\/\/([a-z0-9.-]{4,})\/(.*)%%(U|E)RL%%/.test(a[1])) ? a[1] : def_customurl;
browser.storage.local.set({
'customurl': my_customurl
});
diff --git a/addons/code/bcma/cg.html b/addons/code/bcma/cg.html
index 6d7e2541..21616254 100644
--- a/addons/code/bcma/cg.html
+++ b/addons/code/bcma/cg.html
@@ -15,6 +15,8 @@
🖇
+ %%URL%% https://mia.ekzemplo.net/
+ %%ERL%% https%3A%2F%2Fmia.ekzemplo.net%2F
diff --git a/addons/code/bcma/cg.js b/addons/code/bcma/cg.js
index 6a40bea1..c4a0249e 100644
--- a/addons/code/bcma/cg.js
+++ b/addons/code/bcma/cg.js
@@ -54,6 +54,9 @@ document.addEventListener('DOMContentLoaded', () => {
}
});
document.getElementById('aus').addEventListener('click', function () {
+ if (!/^http(|s):\/\/([a-z0-9.-]{4,})\/(.*)%%(U|E)RL%%/.test(document.getElementById('vau').value)) {
+ document.getElementById('vau').value = '';
+ }
browser.runtime.sendMessage(['au', document.getElementById('vau').value]);
});
document.getElementById('exp').addEventListener('click', () => {
diff --git a/addons/code/bcma/manifest.json b/addons/code/bcma/manifest.json
index 87396d14..c5a97451 100644
--- a/addons/code/bcma/manifest.json
+++ b/addons/code/bcma/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Bloku Cloudflaron MITM-Atakon",
"description": "Submetiĝu al tutmonda gvatado aŭ rezistu",
- "version": "1.0.5.6",
+ "version": "1.0.6",
"homepage_url": "http://crimeflare.eu.org/",
"author": "Crimeflare #Addon",
"permissions": [