mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-16 06:05:37 +07:00
Hotfix for performance issue and center "rules"-btn
- Delete temporary the async promise function, because it works not like it should work. (We will test some methods to increase the performance, but the performance is already okay) + Add suggestion from @grenzor #21 to center the "rules-status"-button
This commit is contained in:
25
clearurls.js
25
clearurls.js
@@ -709,24 +709,19 @@ function handleActivated(activeInfo) {
|
||||
browser.tabs.onActivated.addListener(handleActivated);
|
||||
|
||||
/**
|
||||
* Handle everything asynchronously.
|
||||
* @type {Promise}
|
||||
* Check the request.
|
||||
*/
|
||||
function promise(requestDetails)
|
||||
{
|
||||
var timeout = 1000;
|
||||
return new Promise((resolve,reject) => {
|
||||
window.setTimeout(() => {
|
||||
if(isDataURL(requestDetails))
|
||||
{
|
||||
resolve({});
|
||||
}
|
||||
else {
|
||||
var ret = clearUrl(requestDetails);
|
||||
resolve(ret);
|
||||
}
|
||||
},timeout);
|
||||
});
|
||||
if(isDataURL(requestDetails))
|
||||
{
|
||||
return {};
|
||||
}
|
||||
else {
|
||||
var ret = clearUrl(requestDetails);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user