Version 1.6.2

Added:
+ Added rules from #172
+ Added rules from #176
+ Added rules from #178

Fixed:
+ #170
+ #162
+ #163
This commit is contained in:
Kevin Röbert
2019-04-26 23:41:44 +02:00
parent 1d6d36eb8c
commit 8ca852476d
7 changed files with 52 additions and 10 deletions

View File

@@ -25,16 +25,16 @@
function historyListenerStart() {
if(storage.historyListenerEnabled) {
browser.webNavigation.onHistoryStateUpdated.addListener(historyCleaner);
browser.webNavigation.onHistoryStateUpdated.addListener(historyCleaner);
}
}
/**
* Function that is triggered on history changes. Injects script into page
* to clean links that were pushed to the history stack with the
* history.pushState method.
* history.replaceState method.
* @param {state object} details The state object is a JavaScript object
* which is associated with the new history entry created by pushState()
* which is associated with the new history entry created by replaceState()
*/
function historyCleaner(details) {
var urlBefore = details.url;
@@ -43,7 +43,7 @@ function historyCleaner(details) {
if(urlBefore != urlAfter) {
browser.tabs.executeScript(details.tabId, {
frameId: details.frameId,
code: 'history.pushState({state: "cleaned_history"},"",'+JSON.stringify(urlAfter)+');'
code: 'history.replaceState({state: "cleaned_history"},"",'+JSON.stringify(urlAfter)+');'
}).then(() => {}, onError);
}
}

View File

@@ -99,7 +99,7 @@ function countFields(url)
*/
function extractFileds(url)
{
return (url.match(/[^\/|\?|&]+=[^\/|\?|&]+/gi) || []);
return (url.match(/[^\/|\?|&]+=*[^\/|\?|&]+/gi) || []);
}
/**