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:
Kevin Röbert 2018-01-09 13:20:33 +01:00
parent 03920709ce
commit 6c42b3617c
4 changed files with 16 additions and 19 deletions

View File

@ -709,24 +709,19 @@ function handleActivated(activeInfo) {
browser.tabs.onActivated.addListener(handleActivated); browser.tabs.onActivated.addListener(handleActivated);
/** /**
* Handle everything asynchronously. * Check the request.
* @type {Promise}
*/ */
function promise(requestDetails) function promise(requestDetails)
{ {
var timeout = 1000;
return new Promise((resolve,reject) => {
window.setTimeout(() => {
if(isDataURL(requestDetails)) if(isDataURL(requestDetails))
{ {
resolve({}); return {};
} }
else { else {
var ret = clearUrl(requestDetails); var ret = clearUrl(requestDetails);
resolve(ret); return ret;
} }
},timeout);
});
} }
/** /**

View File

@ -2,5 +2,5 @@
* This file writes only the version into every page. * This file writes only the version into every page.
* @return version * @return version
*/ */
var version = "1.2.1.0"; var version = "1.2.1.1";
$('#version').text(version); $('#version').text(version);

View File

@ -104,8 +104,10 @@
<div class="row"> <div class="row">
<div class="col-sm-1"> <div class="col-sm-1">
<h5><b>Rules-Status</b></h5> <h5><b>Rules-Status</b></h5>
<div class="text-center">
<a href="https://github.com/KevinRoebert/ClearUrls/commits/master/data/data.json" <a href="https://github.com/KevinRoebert/ClearUrls/commits/master/data/data.json"
id="hashStatus" class="btn btn-primary btn-xs pull-right"></a> id="hashStatus" class="btn btn-primary btn-xs"></a>
</div>
<div class="clearfix"></div> <div class="clearfix"></div>
<br /> <br />
</div> </div>

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "ClearURLs", "name": "ClearURLs",
"version": "1.2.1.0", "version": "1.2.1.1",
"author": "Kevin R.", "author": "Kevin R.",
"description": "Remove tracking elements form URLs.", "description": "Remove tracking elements form URLs.",
"homepage_url": "https://github.com/KevinRoebert/ClearUrls", "homepage_url": "https://github.com/KevinRoebert/ClearUrls",