您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Keep the budget summary box on-screen in the right column.
// ==UserScript== // @name Mint Sticky Budget Summary // @namespace http://mint.com/ // @version 1.0.1 // @description Keep the budget summary box on-screen in the right column. // @match https://wwws.mint.com/planning.event // @require https://code.jquery.com/jquery-2.1.1.min.js // @copyright 2012+, You // ==/UserScript== (function ($) { StickySummary = { // Declare elements sidebar: [], summary: [], buffer: 30, boxtop: 0, // Init init: function() { var self = this; $(window).scroll(function() { // Ensure the elements are set. // They appear to be loaded via ajax from Mint. if (self.sidebar.length == 0) { self.sidebar = $('#main td.details-budgets'); self.summary = $("#right_col", self.sidebar); if (self.sidebar.length > 0) { // Set the top buffer var $pos = self.summary.offset(); self.boxtop = $pos.top; } } // Compare the position with the top of the screen and lock the summary // if it scrolls past the top. if (self.sidebar.length > 0) { var $pos = $(document).scrollTop(); if ($pos >= (self.boxtop - self.buffer)) { self.summary.css({ 'position': 'fixed', 'top': self.buffer, 'margin-top': 0 }); } else { self.summary.css({ 'position': 'static', 'top': '', 'margin-top': '' }); } } }); } }; // Run the script $(document).ready(function() { StickySummary.init(); }); })(jQuery);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址