您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name Google Plus Image Download Button // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://plus.google.com/ // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js // ==/UserScript== (function() { 'use strict'; var css = ` ._post-image-download { margin: 20px; text-align: right; position: relative; overflow: hidden; } ._post-image-download a { color: #000000; padding: 0; line-height: 36px; width: 36px; height: 36px; display: block; text-align: center; float: right; font-size: 24px; border-radius: 50%; background-color: #eee; } `; $('head').append('<style type="text/css">' + css + '</style>'); function addDownloadButtons() { //$('._post-image-download').remove(); $('.SlwI7e').each(function() { if ( $('._post-image-download', this).length > 0 ) return; var img = $('img', this); if (img.length == 1) { var url = img[0].src.replace(/\/w[0-9]+-h[0-9]+[^\/]*\//, '/w9999-h9999/'); $(this).append('<div class="_post-image-download"><a target="_blank" href="'+url+'">🖪</a></div>'); } else { $(this).append('<div class="_post-image-download">error</div>'); } //console.log(this); }); } addDownloadButtons(); setInterval( addDownloadButtons, 1000 * 4 ); })();