您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
for tumblrs with the optica theme, move header to side and automatically display post notes
当前为
// ==UserScript== // @name tumblr optica restyle // @namespace http://greasyfork.icu/en/users/36620 // @version 0.2 // @description for tumblrs with the optica theme, move header to side and automatically display post notes // @author scriptfairy // @include /https?:\/\/(?!www).+\.tumblr\.com.*/ // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js // @run-at document-body // ==/UserScript== (function($) { if ($('a[href$="optica"]').length > 0) { var themeBackground = $('body').css('background-color'); themeBackground = themeBackground.slice(themeBackground.indexOf('(')+1,themeBackground.indexOf(')')); var themeSplit = themeBackground.split(','); var r, g, b, searchColor; r = themeSplit[0] < 128 ? 255 : 0; g = themeSplit[1] < 128 ? 255 : 0; b = themeSplit[2] < 128 ? 255 : 0; searchColor = 'rgb('+r+','+g+','+b+')'; console.log(searchColor); $('<style>').text( '.iframe-controls--desktop {width:500px;} .logo-wrapper {color:'+searchColor+';} #posts .post-wrapper {overflow:visible;width:700px} .l-container {padding:0;} .inline-meta {width:100%;} .date-note-wrapper #notes {display:block;position:relative;min-height:50px;width:100%;margin:0;left:-10px;top:32px;border:none;box-shadow:none;} .date-note-wrapper .post-date {position:absolute;top:4px;right:120px;} .notes-wrapper .notes {overflow:auto;max-height:100%;} .post-footer .post-controls {position:absolute;top:0;right:0;} .header-wrapper {position:absolute;top:50px;} .header-wrapper #header {width:500px;margin:25px;} #posts, #footer {float:right;top:75px;right:50px;} .staff-blogs {position:absolute;left:-150px;}' ).appendTo($('head')); } })(window.jQuery);