MassDrop Automatic Guest Mode

When opening a Massdrop URL, check to see if "?mode=guest_open" is appended to the URL, and if not, append it. This will allow unregistered users to browse Massdrop.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        MassDrop Automatic Guest Mode
// @namespace   Symmetry
// @match       *://*.massdrop.com/*
// @run-at      document-start
// @description When opening a Massdrop URL, check to see if "?mode=guest_open" is appended to the URL, and if not, append it. This will allow unregistered users to browse Massdrop.
// @version 0.0.1.20160128061648
// ==/UserScript==

/*--- Test that "?mode=guest_open" is at end of URL, excepting any "hashes"
    or searches.
*/
if ( ! /mode=guest_open/.test(window.location.search) ) {

    var newURL  = window.location.protocol + "//"
                + window.location.host
                + window.location.pathname + "?mode=guest_open"
                + window.location.search
                + window.location.hash
                ;
    /*-- replace() puts the good page in the history instead of the
        bad page.
    */
    window.location.replace (newURL);
}