您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Skips Upworthy and links you directly to the YouTube / vimeo page
// ==UserScript== // @name Down with Upworthy // @namespace userscript.danielrozenberg.com // @description Skips Upworthy and links you directly to the YouTube / vimeo page // @include http://www.upworthy.com/* // @version 1 // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js // ==/UserScript== $(document).ready(function() { var YOUTUBE_REGEXP = /^.+?youtube\.com\/embed\/(.+?)\?.*/; var VIMEO_REGEXP = /^.+?vimeo\.com\/video\/(\d+)\?.*/; var src = $('.fluid-width-video-wrapper iframe').attr('src'); if (YOUTUBE_REGEXP.test(src)) { id = src.replace(YOUTUBE_REGEXP, "$1"); window.location.replace("https://youtube.com/watch?v=" + id); } else if (VIMEO_REGEXP.test(src)) { id = src.replace(VIMEO_REGEXP, "$1"); window.location.replace("https://vimeo.com/" + id); } });