您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Link to Printer IPs.
- // ==UserScript==
- // @name Link to Printer IPs
- // @namespace thewildsun
- // @version 0.1
- // @description Link to Printer IPs.
- // @author thewildsun
- // @match http://printers.bah.com/
- // @grant none
- // @require https://code.jquery.com/jquery-3.3.1.min.js
- // ==/UserScript==
- (function() {
- 'use strict';
- var reg = /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/;
- $('a').each(function(){
- var titlestr = $(this).attr('title');
- //console.log($(this).text().trim());
- if (titlestr && $(this).text().trim().length > 0) {
- var m = titlestr.match(reg);
- if (m) {
- $('<a>', {'href':'http://'+m[0], 'target':'_blank', 'class':'iplink', html:m[0]}).insertBefore($(this));
- }
- }
- });
- })();