Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added hyperlinks to Log Page for JS analysis #464

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion html/updated.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
<div class="panel-body">
<div class="alert alert-warning"><p><strong>ScriptSafe is on <a href="https://chrome.google.com/webstore/detail/scriptsafe/oiigbmnaadbkfbmpbfijlflahbdbdgdf" target="_blank">Chrome</a>, <a href="https://addons.opera.com/en/extensions/details/scriptsafe-2/" target="_blank">Opera</a>, and now: <a href="https://addons.mozilla.org/firefox/addon/script-safe/" target="_blank">Firefox</a>!</strong></p><p>My sincere thanks to all testers, translators, and users for your support over the past 6 years.</p></div>
<p>In this release you will find the following updates:</p>
<ul>
<li><strong>v1.0.9.4:</strong><ul>
<li>Added hyperlinks in URL references</li>
<li>Hyperlinks open in new tabs</li>
<li>Updated truncate function to allow up to 64 characters from 54</li>
</ul></li>
</ul>
<ul>
<li><strong>v1.0.9.3:</strong><ul>
<li>Added ability to temporarily disable ScriptSafe for a set time via the panel (useful if buying something online)</li>
Expand Down Expand Up @@ -82,4 +89,4 @@
<script type="text/javascript" src="../js/updated.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions js/popup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ScriptSafe - Copyright (C) andryou
// Distributed under the terms of the GNU General Public License
// The GNU General Public License can be found in the gpl.txt file. Alternatively, see <http://www.gnu.org/licenses/>.
var version = '1.0.9.3';
var version = '1.0.9.4';
var port = chrome.runtime.connect({name: "popuplifeline"});
var bkg = chrome.extension.getBackgroundPage();
var closepage, mode, taburl, tabid, tabdomain;
Expand Down Expand Up @@ -629,4 +629,4 @@ function save(url, el, type) {
}
}
selected = false;
}
}
20 changes: 10 additions & 10 deletions js/recents.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Distributed under the terms of the GNU General Public License
// The GNU General Public License can be found in the gpl.txt file. Alternatively, see <http://www.gnu.org/licenses/>.
'use strict';
var version = '1.0.9.3';
var version = '1.0.9.4';
var bkg = chrome.extension.getBackgroundPage();
var syncstatus;
document.addEventListener('DOMContentLoaded', function () {
Expand Down Expand Up @@ -64,19 +64,19 @@ function loadOptions() {
var clearBtn = '';
if (blockedarr[i][5] == '1') clearBtn = '<span class="box box4" title="Clear Domain from List">'+bkg.getLocale("clear")+'</span>';
if (blockedarr[i][2] == 'NOSCRIPT' || blockedarr[i][2] == 'WEBBUG') {
$("#blocked > table > tbody").append('<tr rel="'+itemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][1])+'</td><td>'+blockedarr[i][2]+'</td><td title="'+blockedarr[i][4]+'">'+truncate(blockedarr[i][4])+'</td><td class="text-right" data-domain="'+itemdomain+'">&nbsp;</td>');
$("#blocked > table > tbody").append('<tr rel="'+itemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+blockedarr[i][1].replace(/"/g, "'")+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][1])+'</a></td><td>'+blockedarr[i][2]+'</td><td title="'+blockedarr[i][4]+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][4])+'</a></td><td class="text-right" data-domain="'+itemdomain+'">&nbsp;</td>');
} else if (blockedarr[i][7] && ((annoyances == 'true' && annoyancesmode == 'strict' && blockedarr[i][5] == '-1' && blockedarr[i][7] == '1') || (antisocial == 'true' && blockedarr[i][7] == '2'))) {
var unwantedType = '';
if (blockedarr[i][7] == '1') unwantedType = bkg.getLocale("unwanted");
else if (blockedarr[i][7] == '2') unwantedType = bkg.getLocale("antisocialpopup");
$("#blocked > table > tbody").append('<tr rel="'+itemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][1])+'</td><td>'+blockedarr[i][2]+'</td><td title="'+blockedarr[i][4]+'">'+truncate(blockedarr[i][4])+'</td><td class="text-right choices" data-domain="'+itemdomain+'" rel="'+blockedarr[i][3]+'"><span class="box box2 x_blacklist selected" rel="1" title="'+unwantedType+'">'+unwantedType+'</span></td>');
$("#blocked > table > tbody").append('<tr rel="'+itemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+blockedarr[i][1].replace(/"/g, "'")+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][1])+'</a></td><td>'+blockedarr[i][2]+'</td><td title="'+blockedarr[i][4]+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][4])+'</a></td><td class="text-right choices" data-domain="'+itemdomain+'" rel="'+blockedarr[i][3]+'"><span class="box box2 x_blacklist selected" rel="1" title="'+unwantedType+'">'+unwantedType+'</span></td>');
} else if (blockedarr[i][8]) {
$("#blocked > table > tbody").append('<tr rel="'+fpitemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][1])+'</td><td>'+blockedarr[i][2]+'</td><td title="'+blockedarr[i][4]+'">'+truncate(blockedarr[i][4])+'</td><td class="text-right fpchoices" data-domain="'+itemdomain+'" rel="'+blockedarr[i][3]+'">'+clearBtn+'<span class="box box1 x_whitelist" rel="0" title="Allow Domain">'+bkg.getLocale("allow")+'</span><span class="box box3 x_bypass" rel="2" title="Temporary">'+bkg.getLocale("temp")+'</span></td>');
$("#blocked > table > tbody").append('<tr rel="'+fpitemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+blockedarr[i][1].replace(/"/g, "'")+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][1])+'</a></td><td>'+blockedarr[i][2]+'</td><td title="'+blockedarr[i][4]+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][4])+'</a></td><td class="text-right fpchoices" data-domain="'+itemdomain+'" rel="'+blockedarr[i][3]+'">'+clearBtn+'<span class="box box1 x_whitelist" rel="0" title="Allow Domain">'+bkg.getLocale("allow")+'</span><span class="box box3 x_bypass" rel="2" title="Temporary">'+bkg.getLocale("temp")+'</span></td>');
} else {
var unwantedType = '';
if (blockedarr[i][7] == '1') unwantedType = '<span class="box box2 x_blacklist selected" rel="1" title="'+bkg.getLocale("unwanted")+'">'+bkg.getLocale("unwanted")+'</span>';
else if (blockedarr[i][7] == '2') unwantedType = '<span class="box box2 x_blacklist selected" rel="1" title="'+bkg.getLocale("antisocialpopup")+'">'+bkg.getLocale("antisocialpopup")+'</span>';
$("#blocked > table > tbody").append('<tr rel="'+itemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][1])+'</td><td>'+blockedarr[i][2]+'</td><td title="'+blockedarr[i][4]+'">'+truncate(blockedarr[i][4])+'</td><td class="text-right choices" data-domain="'+itemdomain+'" rel="'+blockedarr[i][3]+'">'+clearBtn+'<span class="box box1 x_whitelist" rel="0" title="Allow Domain">'+bkg.getLocale("allow")+'</span><span class="box box1 x_trust" rel="3" title="Trust Entire Domain">'+bkg.getLocale("trust")+'</span>'+unwantedType+'<span class="box box3 x_bypass" rel="2" title="Temporary">'+bkg.getLocale("temp")+'</span></td>');
$("#blocked > table > tbody").append('<tr rel="'+itemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+blockedarr[i][1].replace(/"/g, "'")+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][1])+'</a></td><td>'+blockedarr[i][2]+'</td><td title="'+blockedarr[i][4]+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(blockedarr[i][4])+'</a></td><td class="text-right choices" data-domain="'+itemdomain+'" rel="'+blockedarr[i][3]+'">'+clearBtn+'<span class="box box1 x_whitelist" rel="0" title="Allow Domain">'+bkg.getLocale("allow")+'</span><span class="box box1 x_trust" rel="3" title="Trust Entire Domain">'+bkg.getLocale("trust")+'</span>'+unwantedType+'<span class="box box3 x_bypass" rel="2" title="Temporary">'+bkg.getLocale("temp")+'</span></td>');
}
if (mode == 'allow') {
if (bkg.checkTemp(itemdomain)) {
Expand Down Expand Up @@ -121,9 +121,9 @@ function loadOptions() {
var clearBtn = '';
if (allowedarr[i][5] == '0' || (allowedarr[i][7] && allowedarr[i][5] == '1')) clearBtn = '<span class="box box4" title="Clear Domain from List">'+bkg.getLocale("clear")+'</span>';
if (allowedarr[i][7]) {
$("#allowed > table > tbody").append('<tr rel="'+fpitemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+allowedarr[i][1].replace(/"/g, "'")+'">'+truncate(allowedarr[i][1])+'</td><td>'+allowedarr[i][2]+'</td><td title="'+allowedarr[i][4]+'">'+truncate(allowedarr[i][4])+'</td><td class="text-right fpchoices" data-domain="'+itemdomain+'" rel="'+allowedarr[i][3]+'">'+clearBtn+'<span class="box box3 x_bypass" rel="2" title="Temporary">'+bkg.getLocale("temp")+'</span></td>');
$("#allowed > table > tbody").append('<tr rel="'+fpitemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+allowedarr[i][1].replace(/"/g, "'")+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(allowedarr[i][1])+'</a></td><td>'+allowedarr[i][2]+'</td><td title="'+allowedarr[i][4]+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(allowedarr[i][4])+'</a></td><td class="text-right fpchoices" data-domain="'+itemdomain+'" rel="'+allowedarr[i][3]+'">'+clearBtn+'<span class="box box3 x_bypass" rel="2" title="Temporary">'+bkg.getLocale("temp")+'</span></td>');
} else {
$("#allowed > table > tbody").append('<tr rel="'+itemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+allowedarr[i][1].replace(/"/g, "'")+'">'+truncate(allowedarr[i][1])+'</td><td>'+allowedarr[i][2]+'</td><td title="'+allowedarr[i][4]+'">'+truncate(allowedarr[i][4])+'</td><td class="text-right choices" data-domain="'+itemdomain+'" rel="'+allowedarr[i][3]+'">'+clearBtn+'<span class="box box2 x_blacklist" rel="1" title="Deny">'+bkg.getLocale("deny")+'</span><span class="box box2 x_trust" rel="4" title="Distrust Entire Domain">'+bkg.getLocale("distrust")+'</span><span class="box box3 x_bypass" rel="2" title="Temporary">'+bkg.getLocale("temp")+'</span></td>');
$("#allowed > table > tbody").append('<tr rel="'+itemdomainfriendly+'"><td>'+padZeros(entryTime.getHours())+':'+padZeros(entryTime.getMinutes())+':'+padZeros(entryTime.getSeconds())+'</td><td title="'+allowedarr[i][1].replace(/"/g, "'")+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(allowedarr[i][1])+'</a></td><td>'+allowedarr[i][2]+'</td><td title="'+allowedarr[i][4]+'"><a target="_blank" rel="noopener noreferrer" href="'+blockedarr[i][1].replace(/"/g, "'")+'">'+truncate(allowedarr[i][4])+'</a></td><td class="text-right choices" data-domain="'+itemdomain+'" rel="'+allowedarr[i][3]+'">'+clearBtn+'<span class="box box2 x_blacklist" rel="1" title="Deny">'+bkg.getLocale("deny")+'</span><span class="box box2 x_trust" rel="4" title="Distrust Entire Domain">'+bkg.getLocale("distrust")+'</span><span class="box box3 x_bypass" rel="2" title="Temporary">'+bkg.getLocale("temp")+'</span></td>');
}
if (mode == 'block') {
if (bkg.checkTemp(itemdomain)) {
Expand All @@ -137,8 +137,8 @@ function loadOptions() {
$(".box").bind("click", handleclick);
}
function truncate(str) {
if (str.length > 54)
return str.substring(0, 54)+'...';
if (str.length > 64)
return str.substring(0, 64)+'...';
return str;
}
function notification(msg) {
Expand Down Expand Up @@ -243,4 +243,4 @@ function handleclick() {
}
bkg.clearRecents();
notification(bkg.getLocale("settingssave"));
}
}
4 changes: 2 additions & 2 deletions js/scriptsafe.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// The GNU General Public License can be found in the gpl.txt file. Alternatively, see <http://www.gnu.org/licenses/>.
// Credits and ideas: NotScripts, AdBlock Plus for Chrome, Ghostery, KB SSL Enforcer
'use strict';
var version = '1.0.9.3';
var version = '1.0.9.4';
var requestTypes, synctimer, recentstimer, reenabletimer, useragentinterval, blackList, whiteList, distrustList, trustList, sessionBlackList, sessionWhiteList, locale;
var langs = {
'en_US': 'English (US)',
Expand Down Expand Up @@ -1580,4 +1580,4 @@ function postLangLoad() {
importSyncHandle(0);
}
init();
}
}
4 changes: 2 additions & 2 deletions js/updated.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// The GNU General Public License can be found in the gpl.txt file. Alternatively, see <http://www.gnu.org/licenses/>.
var bkg = chrome.extension.getBackgroundPage();
document.addEventListener('DOMContentLoaded', function () {
var version = '1.0.9.3';
var version = '1.0.9.4';
$("#title").html("ScriptSafe v"+version);
$('#versionno').html(version);
$("#loadoptionspage").click(function() { location.href='options.html'; });
Expand All @@ -20,4 +20,4 @@ function disableNotification() {
localStorage['updatenotify'] = 'false';
$('#message').html(bkg.getLocale("updatedisablemessage")).stop().fadeIn("slow").delay(2000).fadeOut("slow");
}
}
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
"name": "ScriptSafe",
"options_page": "html/options.html",
"permissions": [ "http://*/*", "https://*/*", "tabs", "unlimitedStorage", "webRequest", "webRequestBlocking", "storage", "notifications", "privacy", "contextMenus" ],
"version": "1.0.9.3"
"version": "1.0.9.4"
}