Skip to content

Commit

Permalink
fix first-run page link issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cqx931 committed Nov 19, 2016
1 parent 34d9873 commit ad78cd4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/_locales/en/adnauseam.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"description": "English: Firstrun.html -> Block Malware"
},
"adnFirstRunHideAllAdsDescription": {
"message": "hide Ads in your selected <a href='\/dashboard.html#3p-filters.html'>filter lists<\/a>",
"message": "hide Ads in your selected <span class='link' id='To3pfilter'>filter lists<\/span>",
"description": "English: Firstrun.html -> hide Ads in your selected filter lists"
},
"adnFirstRunClickingAdsDescription": {
"message": "register visits on Ads found via your <a href='\/dashboard.html#3p-filters.html'>filter lists<\/a>",
"message": "register visits on Ads found via your <span class='link' id='To3pfilter'>filter lists<\/span>",
"description": "English: Firstrun.html -> register visits on Ads found via your filter lists"
},
"adnFirstRunBlockingMalwareDescription": {
"message": "optimize your settings to protect against malware and non-visual trackers (<a href='\/dashboard.html#security'>customize<\/a>)",
"message": "optimize your settings to protect against malware and non-visual trackers (<span class='link' id='ToOptions'>customize<\/span>)",
"description": "English: Firstrun.html -> optimize your settings to protect against malware and non-visual trackers (customize)"
},
"adnNotificationButtonReactivate": {
Expand Down
6 changes: 6 additions & 0 deletions src/css/firstrun.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ form a {
color: inherit;
text-decoration: underline;
}
.link{
text-decoration: underline;
}
.link:hover{
color: #3B96FF;
}
.toggled0{
display:none;
}
Expand Down
9 changes: 8 additions & 1 deletion src/js/adn/firstrun.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
vAPI.i18n.render();

}

/******************************************************************************/

// TODO: use data-* to declare simple settings
Expand Down Expand Up @@ -177,6 +177,13 @@
uNode.val(details[uNode.attr('data-setting-name')])
.on('change', onInputChanged);
});

uDom(document).on('click', '#To3pfilter', function() {
openPage('/dashboard.html#3p-filters.html');
});
uDom(document).on('click', '#ToOptions',function (e) {
openPage('/dashboard.html#options.html');
});

uDom('#confirm-close').on('click', function (e) {
if (hasEnabledToggle()) {
Expand Down
10 changes: 7 additions & 3 deletions src/js/adn/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,19 +204,23 @@ function reactivateList() {
}, reloadPane);
}

function openExtPage() {
vAPI.messaging.send(
function openPage(url){
vAPI.messaging.send(
'default', {
what: 'gotoURL',
details: {
url: vAPI.extensionsPage,
url: url,
select: true,
index: -1
}
}
);
}

function openExtPage() {
openPage(vAPI.extensionsPage);
}

function reloadPane() {

if (window && window.location) {
Expand Down

0 comments on commit ad78cd4

Please sign in to comment.