您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
change black to blue
当前为
// ==UserScript== // @name bilibili网页视频简介中的链接可以点击(按行区分) // @namespace http://tampermonkey.net/ // @version 0.3 // @description change black to blue // @author beibeibeibei // @match *.bilibili.com/video/* // @grant none // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js // ==/UserScript== (function() { 'use strict'; // Your code here... var $=jQuery.noConflict(); var reg = /([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|[wW]{3}.|[wW][aA][pP].|[fF][tT][pP].|[fF][iI][lL][eE].)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/; function hide_info(){ $("#v_desc").find(".info").hide(); } function show_info(){ $("#v_desc").find(".info").show(); } function hide_info2(){ $("#v_desc").find(".info2").hide(); } function show_info2(){ $("#v_desc").find(".info2").show(); } function new_info2(){ $("#v_desc").find(".info").after('<div class="info2"></div>'); } function splitLines(str) {return str.split(/\r?\n/);} function add_button(){ if($(".changemodebutton").length < 1){ $("#v_desc").find(".info").before('<input class="changemodebutton" type="button" value="切换显示" title="点击切换原版和修改版(来自油猴脚本)">'); $(".changemodebutton").on('click',function click_changemodebutton(){ if($("#v_desc").find(".info").is(":visible")){ hide_info(); show_info2(); $(".changemodebutton")[0].value = "切换原版"; }else{ show_info(); hide_info2(); $(".changemodebutton")[0].value = "切换改版"; } }); } if($("#v_desc").find(".info2").length < 1){ $("#v_desc").find(".info").after('<div class="info2"></div>'); $("#v_desc").find(".info2").width($("#v_desc").find(".info").width()); hide_info(); show_info2(); } var info_html = $("#v_desc").find(".info").html(); var html_array = splitLines(info_html); $(".l-con").off('DOMNodeInserted',add_button); $("#v_desc").find(".info2").html(""); for(var i=0;i<html_array.length;i++){ if(reg.test(html_array[i])){ $("#v_desc").find(".info2").append('<p><a href="' + html_array[i] + '" target="_blank" style="color:blue;">' + html_array[i] + '</a></p>'); }else if(html_array[i] == ""){ $("#v_desc").find(".info2").append('<br>'); }else{ $("#v_desc").find(".info2").append('<p>' + html_array[i] + '</p>'); } } $(".l-con").on('DOMNodeInserted',add_button); } $(".l-con").on('DOMNodeInserted',add_button); // Your code here... // Your code here... // Your code here... })();