Are you sure you want to go to an external site to donate a monetary value?
WARNING: Some countries laws may supersede the payment processors policy such as the GDPR and PayPal. While it is highly appreciated to donate, please check with your countries privacy and identity laws regarding privacy of information first. Use at your utmost discretion.
Huge pull requests won't load in 1 chunk, so the script misses additional containers.
Also it's tedious to click all the diffs that weren't loaded and expanded.
Here's an update I'm using:
// ==UserScript== // @name Hide Annoying BitBucket Diffs // @namespace http://sagegerard.com // @version 0.1 // @description Hides bulky diff blocks for autogenerated files in BitBucket pull requests using RegExp patterns defined by clear-text resource // @author Sage Gerard // @match https://*.bitbucket.org/*/pull-requests/* // @resource ignorePatterns https://pastebin.com/raw/MTTktsuE // @grant GM_getResourceText // ==/UserScript== /* .*meta$ .*prefab$ .*unity$ .*asset$ .*anim$ .*controller$ .*png$ .*tpsheet$ .*spriteatlas$ */ (function() { 'use strict'; var timer = setInterval(function() { const diffBlocks = document.getElementById('changeset-diff').querySelectorAll('.iterable-item'); const len = diffBlocks.length; const textSource = GM_getResourceText("ignorePatterns"); if (!textSource) { console.log('[HABD] Could not load ignore patterns to hide BitBucket diffs, or no patterns were defined. Check your resource?'); return; } const patterns = textSource.split(/\r?\n/).map((pattern) => new RegExp(pattern)); if (len > 0) { for (let i = 0; i < len; ++i) { const db = diffBlocks[i]; const filename = db.getAttribute('data-identifier'); if (patterns.some(re => re.test(filename))) { db.remove(); console.log('[HABD] Removed diff block for ', filename); } else { var tryAgain = db.getElementsByClassName('load-diff'); if (tryAgain.length > 0) { tryAgain[0].click(); } } } //clearInterval(timer); } }, 500); })();