From 7e25457600a7f82dfe23955b0df60d9d487af965 Mon Sep 17 00:00:00 2001 From: Rahul Kapoor Date: Tue, 9 May 2017 22:03:36 +0530 Subject: [PATCH] Disable material design added. --- Extension for chrome.zip | Bin 455183 -> 456055 bytes Extension for chrome/manifest.json | 7 ++-- Extension for chrome/options.html | 7 +++- .../scripts/home/modify_spotlight.js | 34 +++++++++++++++++- Extension for chrome/scripts/options.js | 18 +++++++--- 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/Extension for chrome.zip b/Extension for chrome.zip index 802f721e6ac5b0196c4ec8915962db5b2972895a..1114150f11c7fa7273b4ef2d0a39dac13ef79880 100644 GIT binary patch delta 5376 zcmZvg2UHVH*T<6(mL6J=E>)C(NR_6BjudIq1Vm7gCPf4hK|_atG$||P5s@NAdY2-- zNJnbuC?E)-D4+uJE%Lt4r|0`}&Yn5{-@S8pX70@H-9&w2-(6w%4TP5=#&S?hMLC*P zW30vO01T$X4i1Qtu!Gt?01b%BMX=%M?y`mnd_EbhBy%;cJCIlES;@x}2Q!`-{N@I$ zG6@0J-o`;!FvhXJwmu z(wPMI2nL+gQ)F+tilUmw!qlVmiD#pQNM+Ld82_hunBX)hbqfgYwrjm8L)%;(<0Wb< z0AmoPN109L($SBZ{w(HKUDTGqz0`Ip-*w6(MY>H=th_G2RrQbAHNtGwLCs5t@%A7N zG@IE)UT40OzP$%?YR*n!V+YTlx$;(qFW%k{t2Tgj7^-o;f=VBfVZxL;;owL3KS&`so zyI!Dh*CXQYbhd4z7E`vL+I=+~^Z9{wvTgf*-Dh30q468Dhx9GfL)W**rQI@JSqqhY zL^$(L+Hj;6pHHb*e?EC`TY{;tI6^IofKO~&8r0xo=w#g)*IOENP3Z0JJ(I9n(LQdJ z$`a=vl5{2h*^1`t1>X1WKfABHH3JtJiRhO;lCoot&Ek(puIfy^A2T|9i@PC|XPWhL z`AclR#fe!R@=)2&`4{93KU;`dKU)j_d|_JW`d)2(^ApR-C4=otFY>OuYP38pp)_>W zRj;7h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<4nFCgJ>h=SQK0{&8KU z!6#niHGqjysCk?*(l5}1)PQ~qBbYp(=y*cp1`kq5U{JJ(oT}?D!nFij zKnLJQ^C?iUgf#c2oK$E3f=q$VYT&XA3xg+LkQU~e6T!BOJl(yw1Q7)Ju>$`UWRTLZ zlb!++D~K(Cn?P{TIT1n>2BNF52^1!AB8pa#lM>6Hh-gJpYM{J^;F8wiEnter Credentials for Pronto Auto Login

- +

New Material UI Design

+ Yes + No +
+
+

diff --git a/Extension for chrome/scripts/home/modify_spotlight.js b/Extension for chrome/scripts/home/modify_spotlight.js index b443cdb..a4188ab 100644 --- a/Extension for chrome/scripts/home/modify_spotlight.js +++ b/Extension for chrome/scripts/home/modify_spotlight.js @@ -1,3 +1,31 @@ +chrome.storage.sync.get({ + material : "" + }, function(items) { + var material = items.material; + console.log(material); + if(material == "Yes"){ + + var a = chrome.extension.getURL("css/home/spotlight_modified.css"); + var b = chrome.extension.getURL("css/materialize.min.css"); + var c = chrome.extension.getURL("scripts/materialize.min.js"); + + var css = document.createElement('link'); + css.type = 'text/css'; + css.rel = 'stylesheet'; + css.href = a; + document.getElementsByTagName('head')[0].appendChild(css); + + var css1 = document.createElement('link'); + css1.type = 'text/css'; + css1.rel = 'stylesheet'; + css1.href = b; + document.getElementsByTagName('head')[0].appendChild(css1); + + var scr = document.createElement('script'); + scr.type = 'text/javascript'; + scr.src = c; + document.getElementsByTagName('head')[0].appendChild(scr); + $(function () { //Attendence $("
").insertBefore(".main_content"); @@ -17,4 +45,8 @@ $(function () { } $(".main_content").remove(); -}); \ No newline at end of file +}); + +} + +}); diff --git a/Extension for chrome/scripts/options.js b/Extension for chrome/scripts/options.js index fe57502..77c905c 100644 --- a/Extension for chrome/scripts/options.js +++ b/Extension for chrome/scripts/options.js @@ -4,20 +4,22 @@ function save_options() { var username = $('#username').val() //var password = document.getElementById('password').value; var password = $('#password').val() + var material = $('input[name=top_bar]:checked').val() //Insted the above 2 calls we can use .next() method without again traversing //var password = username.nextElementSibling.val() chrome.storage.sync.set({ username: username, - password: password + password: password, + material: material }, function () { // Update status to let user know options were saved. //var status = document.getElementById('status'); var status = $('#status')[0] - status.textContent = 'Credentials saved.'; + status.textContent = 'Credentials & settings saved.'; setTimeout(function () { status.style.display = 'none'; - }, 750); + }, 800); }); } @@ -28,11 +30,19 @@ jQuery(document).ready( // Use default value color = 'red' and likesColor = true. chrome.storage.sync.get({ username: "", - password: "" + password: "", + material: "" }, function (items) { //document.getElementById('username').value = items.username; //document.getElementById('password').value = items.password; + if(items.material == "Yes"){ + $('input[value="Yes"]').attr('checked',true); + } + else { + $('input[value="No"]').attr('checked',true); + } + //Using jquery $('#username').val(items.username) $('#password').val(items.password)