Greasy Fork 支持简体中文。

Clickable GameFAQs Links

Turns URL text in posts into clickable links.

目前為 2014-05-11 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Clickable GameFAQs Links
// @description Turns URL text in posts into clickable links.
// @namespace   http://userscripts.org/users/527104
// @include     *gamefaqs.com/boards/*
// @version     1.1.1
// @grant       none
// ==/UserScript==

var regex = /(https?\:\/\/)+[\w\.\/\-\?=\(\)]*/gi;

$("td.msg").each(function() {
    var text = $(this).html();
    
    $(this).html(text.replace(regex, function(match) {
        console.log(match);
        return "<a href='" + match + "' target='_blank'>" + match + "</a>";
    }));
});