Fixed bug. 2.8.3 => 2.8.4

This commit is contained in:
ManeraKai 2024-05-02 02:47:44 +03:00
parent fee58c5650
commit 1b529ed392
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
3 changed files with 5 additions and 7 deletions

View File

@ -62,13 +62,12 @@ async function redirectAsync(url, type, initiator, forceRedirection) {
} }
/** /**
* @param url * @param {URL} url
* @param frontend * @param {string} frontend
* @param randomInstance * @param {string} randomInstance
* @returns {undefined|string} * @returns {undefined|string}
*/ */
function rewrite(url, frontend, randomInstance) { function rewrite(url, frontend, randomInstance) {
if (!frontend || !randomInstance) return
switch (frontend) { switch (frontend) {
case "hyperpipe": { case "hyperpipe": {
return `${randomInstance}${url.pathname}${url.search}`.replace(/\/search\?q=.*/, searchQuery => searchQuery.replace("?q=", "/")) return `${randomInstance}${url.pathname}${url.search}`.replace(/\/search\?q=.*/, searchQuery => searchQuery.replace("?q=", "/"))
@ -316,7 +315,6 @@ function rewrite(url, frontend, randomInstance) {
if (notExchangeRegex) { if (notExchangeRegex) {
return `${randomInstance}/exchange/${notExchangeRegex[0]}${url.pathname}${url.search}` return `${randomInstance}/exchange/${notExchangeRegex[0]}${url.pathname}${url.search}`
} }
// "Default case"
return `${randomInstance}${url.pathname}${url.search}` return `${randomInstance}${url.pathname}${url.search}`
} }
case "biblioReads": { case "biblioReads": {

View File

@ -1,7 +1,7 @@
{ {
"name": "__MSG_extensionName__", "name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__", "description": "__MSG_extensionDescription__",
"version": "2.8.3", "version": "2.8.4",
"manifest_version": 2, "manifest_version": 2,
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'> <gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='oladmjdebphlnjjcnomfhhbfdldiimaf'> <app appid='oladmjdebphlnjjcnomfhhbfdldiimaf'>
<updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.8.3/libredirect-2.8.3.crx' version='2.8.3' /> <updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.8.4/libredirect-2.8.4.crx' version='2.8.4' />
</app> </app>
</gupdate> </gupdate>