summaryrefslogblamecommitdiffstats
path: root/.config/qutebrowser/greasemonkey/unsplash.js
blob: 17b117b4e5cecda3cdd79dc0b3ce4b54e8270eba (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                      
 








                                                                  







                                                              
// ==UserScript==
// @name         custom unsplash
// @match        https://unsplash.com/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    document.querySelectorAll('[data-ad="true"]').forEach(function(e){
        console.log("AAAAAAAA");
        e.remove();
    });

})();

GM_addStyle(`
    div[data-ad="true"], div[data-test="AffiliatesGrid-Content"] {
        visibility: hidden;
        width: 0;
        height: 0;
    }
`)

const text = 'Unsplash+';
for (const container of document.querySelectorAll('figure')) {
    if (container.textContent.includes(text)) {
        container.remove();
    }
    console.log(container);
}
remember that computers suck.