Reddit Flair Linkifier

Turns the text in various subreddits' flair into links

目前为 2016-08-12 提交的版本。查看 最新版本

// ==UserScript==
// @name         Reddit Flair Linkifier
// @namespace    https://gf.qytechs.cn/users/649
// @version      1.1.2
// @description  Turns the text in various subreddits' flair into links
// @author       Adrien Pyke
// @match        *://www.reddit.com/*
// @require      https://gf.qytechs.cn/scripts/5679-wait-for-elements/code/Wait%20For%20Elements.js?version=122976
// @grant        none
// ==/UserScript==

(function() {
	'use strict';

	waitForElems('span.flair', function(flair) {
		flair.innerHTML = flair.textContent.split(' ').map(function(segment) {
			if (segment.match(/^https?:\/\//)) {
				return '<a href="' + segment + '" target="_blank">' + segment + '</a>';
			} else {
				return segment;
			}
		}).join(' ');
	});
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址