您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Skips Yelp's redirect page and causes restaurant site links to be direct.
// ==UserScript== // @name Direct Links From Yelp // @namespace http://tampermonkey.net/ // @version 1.0 // @description Skips Yelp's redirect page and causes restaurant site links to be direct. // @author Guessed#8822 // @license MIT // @match https://www.yelp.com/* // @require http://code.jquery.com/jquery-latest.js // ==/UserScript== $(document).ready(function() { $('a').each(function() { try { if($(this).attr('href').indexOf('biz_redir') > -1) { //this looks for urls that include the redirect page var wrkstr = $(this).attr('href'); wrkstr = wrkstr.replaceAll('%3A', ':'); //replace url-safe colons with colon characters wrkstr = wrkstr.replaceAll('%2F', '/'); //same for slashes wrkstr = wrkstr.slice(wrkstr.indexOf('url=http')+4); //slice off everything before the url= parameter if (wrkstr.indexOf('&') > -1) { wrkstr = wrkstr.substring(0, wrkstr.indexOf('&')); //remove any parameters after url } $(this).attr('href', wrkstr); //write the fixed URL to the href attribute } } catch(error) { //this accounts for a-tags that have no href value } }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址