1
0
Fork 0

add travis

This commit is contained in:
Lukas Winkler 2017-08-27 20:20:57 +02:00
parent 1227255503
commit 12552a6786
3 changed files with 17 additions and 5 deletions

3
.jshintrc Normal file
View file

@ -0,0 +1,3 @@
{
"quotmark": false
}

10
.travis.yml Normal file
View file

@ -0,0 +1,10 @@
language: node_js
node_js:
- "node"
before_script:
- npm install -g jshint
- npm install -g web-ext
script:
- jshint js/
- webext lint

View file

@ -24,13 +24,13 @@ document.addEventListener('DOMContentLoaded', function() {
document.getElementById(id).innerText = chrome.i18n.getMessage(translateKey);
});
var translatableTitles = ["host", "goto_host", "save", "reset", "draft_remove", "piwik_url", "site_id"];
translatableIDs.forEach(function(id) {
translatableTitles.forEach(function(id) {
var translateKey = id.replace("-", "_") + "_title";
document.getElementById(id).setAttribute('title', chrome.i18n.getMessage(translateKey));
});
popup.el.piwikURL.setAttribute("placeholder", chrome.i18n.getMessage("piwik_url_placeholder"));
popup.el.siteID.setAttribute("placeholder", chrome.i18n.getMessage("site_id_placeholder"));
document.title = chrome.i18n.getMessage("extention_name")
document.title = chrome.i18n.getMessage("extention_name");
},
host: undefined,
url: undefined,
@ -52,7 +52,7 @@ document.addEventListener('DOMContentLoaded', function() {
// editor.setHighlightActiveLine(false);
editor.getSession().on('change', this.onChange);
editor.$blockScrolling = Infinity;
editor.setReadOnly(true)
editor.setReadOnly(true);
},
apply: function(source) {
var editor = this.editorInstance;
@ -67,8 +67,7 @@ document.addEventListener('DOMContentLoaded', function() {
popup.host = url.host;
popup.protocol = url.protocol;
popup.url = popup.protocol + "//" + popup.host;
// chrome.tabs.sendMessage(popup.tabId, {method: "getData", reload: false}, popup.apiclb.onGetData);
chrome.storage.sync.get(popup.url, popup.apiclb.onGetData)
chrome.storage.sync.get(popup.url, popup.apiclb.onGetData);
},
onGetData: function(items) {
// console.warn(response);