您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Parses all links and shows ROM ID before the link text, for all links to ROM description pages.
- // ==UserScript==
- // @name Planetemu.net - Show ROM ID at links to ROM pages
- // @author Denilson Sá
- // @namespace http://denilson.sa.nom.br/
- // @version 1.1
- // @description Parses all links and shows ROM ID before the link text, for all links to ROM description pages.
- // @grant none
- // @license Public domain
- // @include http://www.planetemu.net/*
- // @include http://planetemu.net/*
- // @include https://www.planetemu.net/*
- // @include https://planetemu.net/*
- // ==/UserScript==
- Array.prototype.forEach.call(
- document.getElementsByTagName('a'),
- function (link) {
- if (link.textContent.trim() != '') {
- var url = link.getAttribute('href');
- var match = url.match(/action=showrom&id=([0-9]+)/);
- if (match) {
- var text = document.createTextNode('[' + match[1] + '] ');
- link.parentNode.insertBefore(text, link);
- }
- }
- }
- );