This Firefox addon lets you open several URLs with one click. No tracking, no ads. https://addons.mozilla.org/de/firefox/addon/auto-tab-opener
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

5.8 KiB

Auto Tab Opener

Auto Tab Opener is a simple Firefox addon that allows you to open multiple URLs at once and to store them locally.

Get the Add-on

Purpose

Use Auto Tab Opener for example if you have several social media pages open all the time and don't want to open them manually every time you restart Firefox or your computer. After the restart you only have to click "open" because Auto Tab Opener saves all your URLs locally right after you enter them.

Screenshots

Screenshot Screenshot

For users

Latest version

  • Codeberg: 2.0
  • Mozilla: 2.0

Languages

  • English
  • German

Do you speak another language fluently? The consider translating Auto Tab Opener!

How to add new URLs

Add new URLs using the plus icon in the popup menu or by clicking on "Add current website".

Supported URLs

Not supported URLs

  • example (no TLD)
  • about:about (internal Firefox pages)
  • file://example.html (local files)

Remove URLs

To remove a URL, simply click the corresponding minus icon. You can delete all websites by clicking on "Reset".

How to pin the tabs

If you want to pin the tabs, check the "Pin tabs" box before clicking "open".

How to do a backup

If you want to export your URLs to a backup file go to Auto Tab Opener's about:addons page and click on "Settings". There you can export and restore your URLs.

How to report a bug

Go to https://codeberg.org/pixelcode/AutoTabOpener/issues and open a new issue (you need a Codeberg account). Also, you can write a review on Mozilla: https://addons.mozilla.org/en-US/firefox/addon/auto-tab-opener/reviews (you need a Firefox account)

Release notes

  • added multi-language support (i18n)
  • added German translation

For developers

How it works

Auto Tab Opener stores all user's URLs in Firefox' local storage using browser.storage.local.set:

urlcheck();
var url = $(this).prev('.urlinput').val();
if(validateUrl(url) == true){
    $(this).next('.warnung').css({ 'display': 'none' });
    $(this).after('<br><input placeholder="example.com" class="urlinput" type="text"></input><i title="Add website" class="fas fa-plus-circle kreis"></i><a class="warnung">Invalid URL!</a>');
    $(this).removeClass('fa-plus-circle');
    $(this).addClass('fa-minus-circle');
} else if(validateUrl(url) == false) {
    $(this).next('.warnung').css({ 'display': 'inline-block' });
}

Before any URLs are added, the urlcheck() function checks that they are valid and have a protocol. Otherwise, https:// is automatically added.

As soon as the user opens the addon's popup Auto Tab Opener looks for the stored domains using browser.storage.local.get and inserts new input fields by a for loop:

for (var i = 0, len = adressen.length; i < len; i++) {
    console.log(adressen[i]);
    var element = '<br><input placeholder="example.com" class="urlinput" type="text" value="' + adressen[i] + '"></input><i title="Add website" class="fas fa-minus-circle kreis"></i><a class="warnung">Invalid URL!</a>';
    $('#initialesfeld').prev('br').before(element);
}

The current website can be added by a button in the addon's popup if it has a valid URL:

chrome.tabs.query({'active': true, 'lastFocusedWindow': true}, function (tabs) {
    url = tabs[0].url;
    if(protocolcheck(url) == true){
        $('#initialesfeld').prev('br').before('<br><input placeholder="example.com" class="urlinput" type="text" value="' + url + '"></input><i title="Add website" class="fas fa-minus-circle kreis"></i><a class="warnung">Invalid URL!</a>');
        urlcheck();
    }
});

Clicking on "Reset" simply removes the addresses' variable from Firefox' storage.

The stored URLs are opened like this:

urls.forEach(function(item){
    if(protocolcheck(item) == true){
        var adresse = item;
    } else {
        var adresse = 'https://' + item;
    }
    chrome.tabs.create({ url: adresse });
});

They can also be pinned:

urls.forEach(function(item){
    if(protocolcheck(item) == true){
        var adresse = item;
    } else {
        var adresse = 'https://' + item;
    }
    chrome.tabs.create({ 
        url: adresse,
        pinned: true
    });
});

Restoring the URLs writes the textarea's value into the addresses' variable:

var urls = $('#urlarea').val();
urls = urls.split(',');
var adressen = JSON.stringify(urls);
browser.storage.local.set({ adressen });

Temporary installation for debugging

To install it temporarily, git-clone this project and choose the manifest.json by clicking on "Load temporary addon" on the Firefox about:debugging#/runtime/this-firefox page.

Something's wrong with the source code?

Feel free to open a new issue if there's something wrong with the source code. You can also fork this repo, code a solution yourself and make a pull request (thanks in advance 😊).

Pull Requests

Pull requests fixing bugs and closing issues are always welcome!

You may use Auto Tab Opener's source code according to my Standard Licence.


jQuery: Auto Tab Opener uses jQuery.

Font Awesome: Auto Tab Opener uses Font Awesome icons. These may be used under the Attribution 4.0 International (CC BY 4.0) license.