Skip to content

Commit

Permalink
Update initialize.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinevia authored Sep 3, 2019
1 parent 49de197 commit 4e32cd5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function Initialize() {
return language;
};

this.to = function (url, data) {
this.to = function (url, data, options) {
if (url.match("^http://") || url.match("^https://")) {
// External url
} else {
Expand All @@ -321,7 +321,14 @@ function Initialize() {
url = url + (url.indexOf('?') <0 ? '?' : '&') + queryString;
}

window.location.href = url;
var options = (typeof options === 'undefined') ? {} : options;

if(options.target === "_blank") {
window.location.href = url;
window.open(url, '_blank', "resizable,scrollbars,status");
} else {
window.location.href = url;
}

return false; // otherwise links will be triggered
};
Expand Down

0 comments on commit 4e32cd5

Please sign in to comment.