Skip to content

Commit

Permalink
Release 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinod committed Mar 20, 2021
1 parent bc09645 commit 30a36a2
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 42 deletions.
Binary file added related/logo-green-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added related/logo-green-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added related/logo-green-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added related/marquee-promo (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added related/promo-tile-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added related/screenshot-1 (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added related/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added related/small-promo-tile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added releases/src.zip
Binary file not shown.
6 changes: 0 additions & 6 deletions src/background.js

This file was deleted.

48 changes: 32 additions & 16 deletions src/content.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/*
1. after auto-redirect allow to add to exception
2. show redirect link below add button
*/
var __fsEnableExtension = true;

window.addEventListener('load', (event) => {
Expand Down Expand Up @@ -93,6 +89,17 @@ __fsInputActiveHttpUrl = function () {
});
}

__fsOpenUrl = function () {
var txtAddUrl = document.getElementById("txtUrlToAdd");
if (txtAddUrl == null)
return;

chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
var tab = tabs[0];
chrome.tabs.update(tab.id, { url: txtAddUrl.value });
});
}

__fsUpdateButtonText = function () {
var txtAddUrl = document.getElementById("txtUrlToAdd");
var btnAddUrl = document.getElementById("btnAddUrl");
Expand Down Expand Up @@ -128,13 +135,14 @@ __fsAddUrl = function (url) {
items.push(url);
chrome.storage.local.set({ '_WhiteListWebSiteStore': items });
var btnAddUrl = document.getElementById("btnAddUrl");
btnAddUrl.value = "Done!";
btnAddUrl.className = 'btn-add';
__fsShowSuccessMessage('Website added! <a href="#" id="hplOpenUrl">Open it now</a>');
btnAddUrl.value = "Remove";
btnAddUrl.className = 'btn-remove';

var hplOpenUrl = document.getElementById("hplOpenUrl");
if (hplOpenUrl != null)
hplOpenUrl.addEventListener("click", __fsOpenUrl);

setTimeout(() => {
btnAddUrl.value = "Remove";
btnAddUrl.className = 'btn-remove';
}, 2000);
});
}

Expand All @@ -144,15 +152,23 @@ __fsRemoveUrl = function (url) {
items.pop(url);
chrome.storage.local.set({ '_WhiteListWebSiteStore': items });
var btnAddUrl = document.getElementById("btnAddUrl");
btnAddUrl.value = "Done!";
btnAddUrl.className = 'btn-remove';
setTimeout(() => {
btnAddUrl.value = "Add";
btnAddUrl.className = 'btn-add';
}, 2000);
__fsShowSuccessMessage('Website removed!');
btnAddUrl.value = "Add";
btnAddUrl.className = 'btn-add';
});
}

__fsShowSuccessMessage = function (message) {
var divMessage = document.getElementsByClassName("success-message")[0];
divMessage.innerHTML = message;
divMessage.style.display = 'inline-block';
//__fsOpenUrl

setTimeout(() => {
divMessage.style.display = 'none';
}, 5000);
}

__fsGetItems = function (localStorageResult) {
var items;
if (localStorageResult == undefined || localStorageResult._WhiteListWebSiteStore == undefined) {
Expand Down
13 changes: 0 additions & 13 deletions src/http-script.js

This file was deleted.

12 changes: 7 additions & 5 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"manifest_version": 2,
"manifest_version": 3,
"author": "Vinod Danekar",
"name": "Stay Secure Online",
"description": "Redirects all websites to https",
"description": "To deliver secure browsing experience, SSO forces the browser to redirect every insecure website to a secure website, automatically.",
"version": "1.0",
"browser_action": {
"action": {
"default_popup": "popup.html",
"default_icon": "logo-green-128.png",
"icons": {
Expand All @@ -27,8 +27,10 @@
}
],
"permissions": [
"<all_urls>",
"tabs",
"activeTab",
"storage"
],
"host_permissions": [
"<all_urls>"
]
}
29 changes: 27 additions & 2 deletions src/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
color: #666;
margin: 0px;
padding: 9px;

}

.container {
Expand Down Expand Up @@ -136,11 +135,35 @@
a.help-link {
color: mediumblue;
}

.success-message-container {
height: 0px;
text-align: center;
}

.success-message {
display: inline-block;
background-color: #81c784;
padding: 5px 7px;
color: #fff;
border: solid 3px #66bb6a;
border-radius: 6px;
display: none;
}

.success-message a {
color: #fff;
}
</style>
</head>

<body>
<div class="container">
<div class="success-message-container">
<div class="success-message">
Success message
</div>
</div>
<div class="label">
<h5>Add website to whitelist</h5>
</div>
Expand All @@ -149,9 +172,11 @@ <h5>Add website to whitelist</h5>
<input id="btnAddUrl" type="button" class="btn-add" value="Add" />
</div>
<div class="info">
<span>&#x1F6C8;</span> Want to read User Guide? <a href="https://vinoddanekar.blogspot.com" class="help-link"
<span>&#x1F6C8;</span> Want to read User Guide? <a
href="https://vinoddanekar.blogspot.com/2021/03/stay-secure-online-user-guide.html" class="help-link"
target="_blank">Click
here.</a>

</div>
</div>
</body>
Expand Down

0 comments on commit 30a36a2

Please sign in to comment.