fix some bugs
- Not possible to reset in firefox - draft always saved
This commit is contained in:
parent
658c40a56b
commit
548b47e896
4 changed files with 20 additions and 21 deletions
|
@ -17,8 +17,8 @@
|
||||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||||
sodipodi:docname="chrome_large_marquee.svg"
|
sodipodi:docname="chrome_large_marquee.svg"
|
||||||
inkscape:export-filename="/home/lukas/git/piwik-injector/docs/chrome_large_marquee.png"
|
inkscape:export-filename="/home/lukas/git/piwik-injector/docs/chrome_large_marquee.png"
|
||||||
inkscape:export-xdpi="25.4"
|
inkscape:export-xdpi="96.000008"
|
||||||
inkscape:export-ydpi="25.4">
|
inkscape:export-ydpi="96.000008">
|
||||||
<defs
|
<defs
|
||||||
id="defs2" />
|
id="defs2" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="0.7"
|
inkscape:zoom="0.7"
|
||||||
inkscape:cx="687.79182"
|
inkscape:cx="687.79182"
|
||||||
inkscape:cy="532.63759"
|
inkscape:cy="361.20902"
|
||||||
inkscape:document-units="px"
|
inkscape:document-units="px"
|
||||||
inkscape:current-layer="layer1"
|
inkscape:current-layer="layer1"
|
||||||
showgrid="false"
|
showgrid="false"
|
||||||
|
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
32
js/popup.js
32
js/popup.js
|
@ -38,7 +38,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
config: {
|
config: {
|
||||||
enable: false
|
enable: false
|
||||||
},
|
},
|
||||||
source: ''
|
source: '',
|
||||||
|
originalSource: chrome.i18n.getMessage("placeholder_javascript")
|
||||||
},
|
},
|
||||||
data: null,
|
data: null,
|
||||||
editor: {
|
editor: {
|
||||||
|
@ -245,26 +246,23 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (confirm(chrome.i18n.getMessage("delete_warning"))) {
|
chrome.storage.sync.get("hosts", function(items) {
|
||||||
|
var hosts = items.hosts;
|
||||||
chrome.storage.sync.get("hosts", function(items) {
|
var index = hosts.indexOf(popup.url);
|
||||||
var hosts = items.hosts;
|
if (index > -1) {
|
||||||
var index = hosts.indexOf(popup.url);
|
hosts.splice(index, 1);
|
||||||
if (index > -1) {
|
|
||||||
hosts.splice(index, 1);
|
|
||||||
}
|
|
||||||
chrome.storage.sync.set({"hosts": hosts});
|
|
||||||
}
|
}
|
||||||
);
|
chrome.storage.sync.set({"hosts": hosts});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
chrome.storage.sync.remove(popup.url);
|
chrome.storage.sync.remove(popup.url);
|
||||||
|
|
||||||
// Set-up empty data
|
// Set-up empty data
|
||||||
popup.data = Object.assign(true, {}, popup.emptyDataPattern);
|
popup.data = Object.assign(true, {}, popup.emptyDataPattern);
|
||||||
popup.applyData();
|
popup.applyData();
|
||||||
|
|
||||||
popup.removeDraft();
|
popup.removeDraft();
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
chrome.storage.sync.get(website, function(obj) {
|
chrome.storage.sync.get(website, function(obj) {
|
||||||
var customjs = obj[website];
|
var customjs = obj[website];
|
||||||
if (customjs && customjs.config.enable) {
|
if (customjs && customjs.config.enable) {
|
||||||
|
console.error(customjs);
|
||||||
// Script
|
// Script
|
||||||
if (customjs.source) {
|
if (customjs.source) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "__MSG_extension_name__",
|
"name": "__MSG_extension_name__",
|
||||||
"short_name": "matomo-injector",
|
"short_name": "matomo-injector",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"author": "Lukas Winkler, xcv58, hromadadan",
|
"author": "Lukas Winkler, xcv58, hromadadan",
|
||||||
"description": "__MSG_extension_description__",
|
"description": "__MSG_extension_description__",
|
||||||
"icons": {
|
"icons": {
|
||||||
|
|
Reference in a new issue