From 10e89c4c26b107ee09d0b163a2903d003e43f19f Mon Sep 17 00:00:00 2001 From: joelthorner Date: Wed, 2 May 2018 19:20:52 +0200 Subject: [PATCH 1/5] Nug fix #8 --- js/executeUsingTabVars.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 js/executeUsingTabVars.js diff --git a/js/executeUsingTabVars.js b/js/executeUsingTabVars.js new file mode 100644 index 00000000..e69de29b From c1b37e1ef0b81ed89a800d5c31473b17717557dd Mon Sep 17 00:00:00 2001 From: joelthorner Date: Wed, 2 May 2018 19:29:56 +0200 Subject: [PATCH 2/5] Bug fix #5 --- js/initOptions.js | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/js/initOptions.js b/js/initOptions.js index f92c9363..6b0b6cc9 100644 --- a/js/initOptions.js +++ b/js/initOptions.js @@ -10,23 +10,18 @@ function aplyUsernameOpt(value){ $('#userNameRes').html(value); value = $.trim(value).toLowerCase(); + console.log(value.indexOf('joel.torner')); - switch (value){ - case "joel.torner": - $('body').addClass('jt'); - break; - case "jordi.canizares": - $('body').addClass('cani'); - break; - case "carlos.garcia": - $('body').addClass('carlos'); - break; - case "cristina.ortega": - $('body').addClass('orto'); - break; - case "andrea": - $('body').addClass('andrea'); - break; + if (value.indexOf('joel.torner') !== -1) { + $('body').addClass('jt'); + }else if(value.indexOf('jordi.canizares') !== -1){ + $('body').addClass('cani'); + }else if(value.indexOf('carlos') !== -1){ + $('body').addClass('carlos'); + }else if(value.indexOf('andrea') !== -1){ + $('body').addClass('andrea'); + }else if(value.indexOf('cristina.ortega') !== -1){ + $('body').addClass('orto'); } } @@ -39,7 +34,7 @@ function aplyProfilePhotoOpt(value){ // init options ------------------------------------------------------------------------------------------------ chrome.storage.sync.get(['optBgLc'], function(result) { - var value = result.optProfilePhoto; + var value = result.optBgLc; if ($.type(value) == 'undefined' || $.trim(value).length == 0){ value = $('#opt-bg-lc').val(); From 56f82d18ee72c2199698bef7a48b39d99aaa7fc6 Mon Sep 17 00:00:00 2001 From: joelthorner Date: Wed, 2 May 2018 19:30:09 +0200 Subject: [PATCH 3/5] Update version number --- manifest.json | 2 +- src/browser_action/browser_action.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index aeb45df1..dfe7f35b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "TLmanaGer", - "version": "1.0.4", + "version": "1.0.5", "manifest_version": 2, "description": "Desarrollamiento tool", "homepage_url": "https://github.com/joelthorner", diff --git a/src/browser_action/browser_action.html b/src/browser_action/browser_action.html index dfc15c7d..7898ceae 100644 --- a/src/browser_action/browser_action.html +++ b/src/browser_action/browser_action.html @@ -12,7 +12,7 @@
- TLmanaGerv1.0.4 + TLmanaGerv1.0.5 Hello, joelthorner
From 769aba03b70552e062379a50d7aa4261a593b994 Mon Sep 17 00:00:00 2001 From: joelthorner Date: Wed, 2 May 2018 19:32:20 +0200 Subject: [PATCH 4/5] Issue #6 --- js/initOptions.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/initOptions.js b/js/initOptions.js index 6b0b6cc9..d9eade9a 100644 --- a/js/initOptions.js +++ b/js/initOptions.js @@ -12,15 +12,15 @@ function aplyUsernameOpt(value){ value = $.trim(value).toLowerCase(); console.log(value.indexOf('joel.torner')); - if (value.indexOf('joel.torner') !== -1) { + if (value.indexOf('joelthorner') !== -1 || value.indexOf('torner') !== -1) { $('body').addClass('jt'); - }else if(value.indexOf('jordi.canizares') !== -1){ + }else if(value.indexOf('jordi.canizares') !== -1 || value.indexOf('canizares') !== -1){ $('body').addClass('cani'); - }else if(value.indexOf('carlos') !== -1){ + }else if(value.indexOf('carlos') !== -1 || value.indexOf('carlos.garcia') !== -1){ $('body').addClass('carlos'); - }else if(value.indexOf('andrea') !== -1){ + }else if(value.indexOf('andrea') !== -1 || value.indexOf('sanabria') !== -1){ $('body').addClass('andrea'); - }else if(value.indexOf('cristina.ortega') !== -1){ + }else if(value.indexOf('cristina.ortega') !== -1 || value.indexOf('ortega') !== -1){ $('body').addClass('orto'); } } From 8a57e0bbcfcac45033e2888451c403eb35042649 Mon Sep 17 00:00:00 2001 From: joelthorner Date: Wed, 2 May 2018 19:35:32 +0200 Subject: [PATCH 5/5] Equalize init variables --- js/initOptions.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/initOptions.js b/js/initOptions.js index d9eade9a..0878b580 100644 --- a/js/initOptions.js +++ b/js/initOptions.js @@ -10,7 +10,6 @@ function aplyUsernameOpt(value){ $('#userNameRes').html(value); value = $.trim(value).toLowerCase(); - console.log(value.indexOf('joel.torner')); if (value.indexOf('joelthorner') !== -1 || value.indexOf('torner') !== -1) { $('body').addClass('jt'); @@ -42,10 +41,10 @@ chrome.storage.sync.get(['optBgLc'], function(result) { value = DEFAULTS.optBgLc; chrome.storage.sync.set({optBgLc: value }, function() { - $('#opt-bg-lc').val(result.optBgLc); + $('#opt-bg-lc').val(value); }); }else{ - $('#opt-bg-lc').val(result.optBgLc); + $('#opt-bg-lc').val(value); } }); chrome.storage.sync.get(['optProfilePhoto'], function(result) { @@ -76,7 +75,7 @@ chrome.storage.sync.get(['userName'], function(result) { aplyUsernameOpt(value); }); }else{ - aplyUsernameOpt(result.userName); + aplyUsernameOpt(value); } }); // end init options -------------------------------------------------------------------------------------------- \ No newline at end of file