Skip to content

Commit

Permalink
Merge pull request #110 from q--/patch-1
Browse files Browse the repository at this point in the history
Allow data URIs to be set as the new tab page
  • Loading branch information
jimschubert committed Apr 28, 2016
2 parents 7089a1c + 13b19fd commit d329c2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
chrome.storage.local.get(["url", "tab.selected", "always-tab-update"], function (items) {
var url = items.url;
if (url) {
url = (0 !== url.indexOf("about:") && -1 === url.indexOf("://")) ? ("http://" + url) : url;
url = (0 !== url.indexOf("about:") && 0 !== url.indexOf("data:") && -1 === url.indexOf("://")) ? ("http://" + url) : url;
if (/^http[s]?:/i.test(url) && items["always-tab-update"] !== true) {
document.location.href = url;
} else {
Expand Down

0 comments on commit d329c2b

Please sign in to comment.