1
0
Fork 0

fix some bugs

- Not possible to reset in firefox
- draft always saved
This commit is contained in:
Lukas Winkler 2018-04-06 11:14:47 +02:00
parent 658c40a56b
commit 548b47e896
No known key found for this signature in database
GPG key ID: 94AFBE7C2656A5B5
4 changed files with 20 additions and 21 deletions

View file

@ -17,8 +17,8 @@
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="chrome_large_marquee.svg"
inkscape:export-filename="/home/lukas/git/piwik-injector/docs/chrome_large_marquee.png"
inkscape:export-xdpi="25.4"
inkscape:export-ydpi="25.4">
inkscape:export-xdpi="96.000008"
inkscape:export-ydpi="96.000008">
<defs
id="defs2" />
<sodipodi:namedview
@ -30,7 +30,7 @@
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="687.79182"
inkscape:cy="532.63759"
inkscape:cy="361.20902"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -38,7 +38,8 @@ document.addEventListener('DOMContentLoaded', function() {
config: {
enable: false
},
source: ''
source: '',
originalSource: chrome.i18n.getMessage("placeholder_javascript")
},
data: null,
editor: {
@ -245,26 +246,23 @@ document.addEventListener('DOMContentLoaded', function() {
return false;
}
if (confirm(chrome.i18n.getMessage("delete_warning"))) {
chrome.storage.sync.get("hosts", function(items) {
var hosts = items.hosts;
var index = hosts.indexOf(popup.url);
if (index > -1) {
hosts.splice(index, 1);
}
chrome.storage.sync.set({"hosts": hosts});
chrome.storage.sync.get("hosts", function(items) {
var hosts = items.hosts;
var index = hosts.indexOf(popup.url);
if (index > -1) {
hosts.splice(index, 1);
}
);
chrome.storage.sync.set({"hosts": hosts});
}
);
chrome.storage.sync.remove(popup.url);
chrome.storage.sync.remove(popup.url);
// Set-up empty data
popup.data = Object.assign(true, {}, popup.emptyDataPattern);
popup.applyData();
// Set-up empty data
popup.data = Object.assign(true, {}, popup.emptyDataPattern);
popup.applyData();
popup.removeDraft();
}
popup.removeDraft();
return false;
},

View file

@ -67,6 +67,7 @@
chrome.storage.sync.get(website, function(obj) {
var customjs = obj[website];
if (customjs && customjs.config.enable) {
console.error(customjs);
// Script
if (customjs.source) {
setTimeout(function() {

View file

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extension_name__",
"short_name": "matomo-injector",
"version": "3.3.0",
"version": "3.3.1",
"author": "Lukas Winkler, xcv58, hromadadan",
"description": "__MSG_extension_description__",
"icons": {