mirror of
https://codeberg.org/LibRedirect/libredirect.git
synced 2025-02-08 16:18:41 +01:00
Fixed bug. 2.8.3 => 2.8.4
This commit is contained in:
parent
fee58c5650
commit
1b529ed392
@ -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": {
|
||||||
|
@ -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": {
|
||||||
|
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user