M01 Gallery Tradition View Redirect

M01改版後,已不適用
// ==UserScript==
// @name           M01 Gallery Tradition View Redirect
// @description    M01 Gallery Tradition View Redirect
// @include        http://www.mobile01.com/gallerydetail.php*
// @include        https://www.mobile01.com/gallerydetail.php*
// ==/UserScript==
/*var links = document.links;
for(var i = 0; i < links.length; i++) {
    if (links[i].href.indexOf('topicdetail') != -1)
    {
        location.assign(links[i].href);
        break;
    }
}*/
location.assign(document.querySelector('a[href^="topicdetail.php"]').href);