greatsuspender / thegreatsuspender

A chrome extension for suspending all tabs to free up memory
https://chrome.google.com/webstore/detail/the-great-suspender/klbibkeccnjlkjkiokjodocebajanakg/
GNU General Public License v2.0
5.04k stars 906 forks source link

Stop showing the welcome screen in Incognito mode!!! #47

Closed mcandre closed 9 years ago

mcandre commented 11 years ago

So annoying.

Sethionic commented 9 years ago

Echoing the sentiment and confirming the issue. (Posted on official chrome store page)

My only gripe is that, when enabled for incognito mode, every new instantiation (opening an incognito tab when none are already open) opens a new tab with an explanation of what the app is and takes the focus away from the new tab and its location bar. I use incognito tabs for quick new sessions or testing things quite frequently, so this is a bit irritating.

Sethionic commented 9 years ago

Upon further inspection, it looks like the code causing the issue is here in background.js :

if (!lastVersion) {
                gsUtils.setGsHistory([]);

                //show welcome screen
                chrome.tabs.create({url: chrome.extension.getURL('welcome.html')});

from:

    function runStartupChecks() {

        var tidyUrls = gsUtils.getOption(gsUtils.TIDY_URLS),
            lastVersion = gsUtils.fetchVersion(),
            curVersion = chrome.runtime.getManifest().version;

        //check for possible crash
        if (!tidyUrls) {
            checkForCrashRecovery();
        }

        //if version has changed then assume initial install or upgrade
        if (lastVersion !== curVersion) {
            gsUtils.setVersion(curVersion);

            //if they are installing for the first time
            if (!lastVersion) {
                gsUtils.setGsHistory([]);

                //show welcome screen
                chrome.tabs.create({url: chrome.extension.getURL('welcome.html')});
            //else if they are upgrading to a new version
            } else {
                //if pre v5 then perform migration
                if (parseFloat(lastVersion) < 5) {
                    gsUtils.performMigration();
                }

                //show update screen
                chrome.tabs.create({url: chrome.extension.getURL('update.html')});
            }
        }

        //inject new content script into all open pages
        reinjectContentScripts();
    }
deanoemcke commented 9 years ago

This has been fixed in the current dev version. Sorry it's taking a while to get out there.

patrickhealy commented 9 years ago

Hey, any chance of you updating this in the chrome store? It would get a lot more downloads. :-)

deanoemcke commented 9 years ago

Webstore will be updated shortly.