From b72efc49631ac78117d67b7d25b80f9499aafe81 Mon Sep 17 00:00:00 2001 From: anmolkaur18 Date: Thu, 25 Jun 2020 17:09:55 +0530 Subject: [PATCH] new branch --- edit.html => HTML/edit.html | 9 + popup.html => HTML/popup.html | 396 +++++++++++---------- edit.js => Javascript/edit.js | 10 +- popup.js => Javascript/popup.js | 205 ++++++----- README.md | 15 +- icons8-100.png => images/iconGirlLarge.png | Bin icons8-19.png => images/iconGirlSmall.png | Bin logo.jpg => images/logo.jpg | Bin logosci.jpeg => images/logosci.jpeg | Bin ss.png => images/ss.png | Bin manifest.json | 6 +- 11 files changed, 351 insertions(+), 290 deletions(-) rename edit.html => HTML/edit.html (93%) rename popup.html => HTML/popup.html (81%) rename edit.js => Javascript/edit.js (85%) rename popup.js => Javascript/popup.js (81%) rename icons8-100.png => images/iconGirlLarge.png (100%) rename icons8-19.png => images/iconGirlSmall.png (100%) rename logo.jpg => images/logo.jpg (100%) rename logosci.jpeg => images/logosci.jpeg (100%) rename ss.png => images/ss.png (100%) diff --git a/edit.html b/HTML/edit.html similarity index 93% rename from edit.html rename to HTML/edit.html index 67d507b..b411743 100644 --- a/edit.html +++ b/HTML/edit.html @@ -140,6 +140,10 @@

Edit Profile Information

+
+ + +
@@ -152,6 +156,10 @@

Edit Profile Information

+
+ + +
@@ -160,6 +168,7 @@

Edit Profile Information

+
diff --git a/popup.html b/HTML/popup.html similarity index 81% rename from popup.html rename to HTML/popup.html index 67f5715..ec9a72b 100644 --- a/popup.html +++ b/HTML/popup.html @@ -1,188 +1,208 @@ - - - - Quick Launcher - - - - - - - -
- -
-
- -
- -
-
Edit
-
- - - + + + + Quick Launcher + + + + + + + +
+ +
+
+ +
+ +
+
Edit
+
+ + + diff --git a/edit.js b/Javascript/edit.js similarity index 85% rename from edit.js rename to Javascript/edit.js index 1eb56f5..83799e8 100644 --- a/edit.js +++ b/Javascript/edit.js @@ -9,10 +9,12 @@ var gitlab_link = document.getElementById('gitlab'); var stackoverflow_link = document.getElementById('stackoverflow'); var facebook_link = document.getElementById('facebook'); var instagram_link = document.getElementById('instagram'); +var bitbucket_link = document.getElementById('bitbucket'); +var blog_link = document.getElementById('blog'); var save_button = document.getElementById('save'); -var array = ["name","website","linkedin","medium","twitter","github", "quora", "stackoverflow", "gitlab", "facebook", "instagram"]; +var array = ["name","website","linkedin","medium","twitter","github", "quora", "stackoverflow", "gitlab","bitbucket","blog", "facebook", "instagram"]; chrome.storage.sync.get(array,function(links){ if(!chrome.runtime.error){ console.log(links); @@ -22,12 +24,16 @@ chrome.storage.sync.get(array,function(links){ website_link.value=links.website; if(links.linkedin) linkedin_link.value=links.linkedin; + if(links.blog) + blog_link.value=links.blog; if(links.medium) medium_link.value=links.medium; if(links.twitter) twitter_link.value=links.twitter; if(links.github) github_link.value=links.github; + if(links.bitbucket) + bitbucket_link.value=links.bitbucket; if(links.quora) quora_link.value=links.quora; if(links.gitlab) @@ -50,9 +56,11 @@ function UpdateLinks(){ "name":name_text.value, "website":website_link.value, "linkedin":linkedin_link.value, + "blog":blog_link.value, "medium":medium_link.value, "twitter":twitter_link.value, "github":github_link.value, + "bitbucket":bitbucket_link.value, "stackoverflow":stackoverflow_link.value, "quora":quora_link.value, "gitlab":gitlab_link.value, diff --git a/popup.js b/Javascript/popup.js similarity index 81% rename from popup.js rename to Javascript/popup.js index 34c16cf..45d78cc 100644 --- a/popup.js +++ b/Javascript/popup.js @@ -1,94 +1,111 @@ -var name_text = document.getElementById('name'); -var website_link = document.getElementById('website_link'); -var linkedin_link = document.getElementById('linkedin_link'); -var medium_link = document.getElementById('medium_link'); -var twitter_link = document.getElementById('twitter_link'); -var github_link = document.getElementById('github_link'); -var quora_link = document.getElementById('quora_link'); -var stackoverflow_link = document.getElementById('stackoverflow_link'); -var gitlab_link = document.getElementById('gitlab_link'); -var facebook_link = document.getElementById('facebook_link'); -var instagram_link = document.getElementById('instagram_link'); - -var array = ["name","website","linkedin","medium","twitter","github", "quora", "stackoverflow", "gitlab", "facebook", "instagram"]; - -function void_click(){ - void(0); -} -chrome.storage.sync.get(array,function(links){ - if(!chrome.runtime.error){ - console.log(links); - if(links.name) - name_text.innerHTML=links.name+"'s "; - - if(links.website) - website_link.href=links.website; - else - website_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.linkedin) - linkedin_link.href=links.linkedin; - else - linkedin_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.medium) - medium_link.href=links.medium; - else - medium_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.twitter) - twitter_link.href=links.twitter; - else - twitter_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.github) - github_link.href=links.github; - else - github_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.quora) - quora_link.href=links.quora; - else - quora_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.gitlab) - gitlab_link.href=links.gitlab; - else - gitlab_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.stackoverflow) - stackoverflow_link.href=links.stackoverflow; - else - stackoverflow_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.facebook) - facebook_link.href=links.facebook; - else - facebook_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - - if(links.instagram) - instagram_link.href=links.instagram; - else - instagram_link.addEventListener('click',function(event){ - event.preventDefault(); - }); - } -}); +var name_text = document.getElementById('name'); +var website_link = document.getElementById('website_link'); +var linkedin_link = document.getElementById('linkedin_link'); +var medium_link = document.getElementById('medium_link'); +var twitter_link = document.getElementById('twitter_link'); +var github_link = document.getElementById('github_link'); +var quora_link = document.getElementById('quora_link'); +var stackoverflow_link = document.getElementById('stackoverflow_link'); +var gitlab_link = document.getElementById('gitlab_link'); +var facebook_link = document.getElementById('facebook_link'); +var instagram_link = document.getElementById('instagram_link'); +var blog_link = document.getElementById('blog_link'); +var bitbucket_link = document.getElementById('bitbucket_link'); + + +var array = ["name","website","linkedin","blog","medium","twitter","github", "quora", "stackoverflow", "bitbucket","gitlab", "facebook", "instagram"]; + +function void_click(){ + void(0); +} +chrome.storage.sync.get(array,function(links){ + if(!chrome.runtime.error){ + console.log(links); + if(links.name) + name_text.innerHTML=links.name+"'s "; + + if(links.website) + website_link.href=links.website; + else + website_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.linkedin) + linkedin_link.href=links.linkedin; + else + linkedin_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.medium) + medium_link.href=links.medium; + else + medium_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.twitter) + twitter_link.href=links.twitter; + else + twitter_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.github) + github_link.href=links.github; + else + github_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.quora) + quora_link.href=links.quora; + else + quora_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.gitlab) + gitlab_link.href=links.gitlab; + else + gitlab_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.stackoverflow) + stackoverflow_link.href=links.stackoverflow; + else + stackoverflow_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.facebook) + facebook_link.href=links.facebook; + else + facebook_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.instagram) + instagram_link.href=links.instagram; + else + instagram_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.blog) + blog_link.href=links.blog; + else + blog_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + + if(links.bitbucket) + bitbucket_link.href=links.bitbucket; + else + blog_link.addEventListener('click',function(event){ + event.preventDefault(); + }); + } +}); diff --git a/README.md b/README.md index 528baae..6b5efe9 100644 --- a/README.md +++ b/README.md @@ -71,11 +71,18 @@ This is motivated by [Traversy Media tutorial on Google Chrome Extention](https: ## 🤷 Project Structure . ├── ... + |── design ├── images - │── icons, logo and screenshots - │── manifest - │── popup.html - |── popup.js + │── icons + |── logos + |── screenshots + │── manifest.json + │── HTML + |── edit.html + |── popup.html + |── Javascript + |── edit.js + |── popus.js |── README └── ... diff --git a/icons8-100.png b/images/iconGirlLarge.png similarity index 100% rename from icons8-100.png rename to images/iconGirlLarge.png diff --git a/icons8-19.png b/images/iconGirlSmall.png similarity index 100% rename from icons8-19.png rename to images/iconGirlSmall.png diff --git a/logo.jpg b/images/logo.jpg similarity index 100% rename from logo.jpg rename to images/logo.jpg diff --git a/logosci.jpeg b/images/logosci.jpeg similarity index 100% rename from logosci.jpeg rename to images/logosci.jpeg diff --git a/ss.png b/images/ss.png similarity index 100% rename from ss.png rename to images/ss.png diff --git a/manifest.json b/manifest.json index d28a949..e809217 100644 --- a/manifest.json +++ b/manifest.json @@ -4,10 +4,10 @@ "name": "Profile Launcher", "description": "Quick launch Media", "version": "1.0.0", - "icons": { "128": "icons8-100.png" }, + "icons": { "128": "images/iconGirlLarge.png" }, "browser_action": { - "default_icon": "icons8-19.png", - "default_popup": "popup.html" + "default_icon": "images/iconGirlSmall.png", + "default_popup": "HTML/popup.html" }, "permissions": [ "activeTab",