Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
TB no longer allows in-app links but always redirects to the system browser.
  • Loading branch information
jobisoft committed Mar 17, 2021
1 parent 6c39a79 commit d94168c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
4 changes: 0 additions & 4 deletions content/firstrun.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ async function on_load() {
document.getElementById("dvipng_path").innerHTML = "<span style='color: #EB887C; font-weight: bold;'>Not Found!</span>";
document.getElementById("button_yes").setAttribute("disabled", "disabled");
}

if (window.arguments && window.arguments[0]) {
window.arguments[0](document);
}
}

async function on_yes() {
Expand Down
24 changes: 0 additions & 24 deletions content/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,6 @@ function pick_file(pref, title) {
});
}

function add_links(aDoc) {
if (!window.Application) //TB 2.x will open this properly in an external browser
return;

var links = aDoc.getElementsByClassName("external");
for (var i = 0; i < links.length; ++i) (function (i) {
dump("link "+i+"\n");
var uri = links[i].getAttribute("href");
links[i].addEventListener("click",
function link_listener (event) {
if (!(uri instanceof Components.interfaces.nsIURI))
uri = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService)
.newURI(uri, null, null);

Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
.getService(Components.interfaces.nsIExternalProtocolService)
.loadURI(uri);

event.preventDefault();
}, true);
})(i);
}

function open_autodetect() {
// Notify WebExtension Background to open the first run tab.
Services.obs.notifyObservers(
Expand Down

0 comments on commit d94168c

Please sign in to comment.