- See images without paying
- Removed sticky paymend block
Last active
June 26, 2024 12:03
-
-
Save Derewith/89e171f0ae5d70ee7677cf4dac4ee0a1 to your computer and use it in GitHub Desktop.
Mobbin Design - Tampermonkey userscript OR bookmarklet
26-06-2024 - v0.0.1
- Initial release
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Mobbin Design VIP by jdc | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-06-26 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match *://mobbin.com/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=mobbin.com | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| function removeStickyAsideElement() { | |
| const stickyAside = document.querySelector('aside.sticky'); | |
| if (stickyAside) { | |
| stickyAside.remove(); | |
| } | |
| } | |
| function modifyImgTags() { | |
| const imgElements = document.getElementsByTagName('img'); | |
| for (let i = 0; i < imgElements.length; i++) { | |
| let img = imgElements[i]; | |
| let src = img.getAttribute('src'); | |
| if (src && src.includes('png') && src.includes('app_screens')) { | |
| const modifiedUrl = new URL(src); | |
| modifiedUrl.searchParams.set('f', 'webp'); | |
| modifiedUrl.searchParams.set('w', '2000'); | |
| modifiedUrl.searchParams.set('q', '85'); | |
| modifiedUrl.searchParams.set('fit', 'shrink-cover'); | |
| modifiedUrl.searchParams.delete('extend-bottom'); | |
| modifiedUrl.searchParams.delete('image'); | |
| modifiedUrl.searchParams.delete('gravity'); | |
| modifiedUrl.searchParams.delete('layer-h'); | |
| modifiedUrl.searchParams.delete('padding-y'); | |
| modifiedUrl.searchParams.delete('padding-right'); | |
| modifiedUrl.searchParams.delete('text'); | |
| modifiedUrl.searchParams.delete('font'); | |
| modifiedUrl.searchParams.delete('padding-top'); | |
| modifiedUrl.searchParams.delete('padding-bottom'); | |
| modifiedUrl.searchParams.delete('color'); | |
| modifiedUrl.searchParams.delete('extend-color'); | |
| img.setAttribute('src', modifiedUrl.toString()); | |
| let parentDiv = img.parentNode; // First parent div | |
| if (parentDiv && parentDiv.tagName.toLowerCase() === 'div') { | |
| parentDiv.className = ''; // Clear all classes | |
| parentDiv = parentDiv.parentNode; // Second parent div | |
| if (parentDiv && parentDiv.tagName.toLowerCase() === 'div') { | |
| parentDiv.className = ''; // Clear all classes | |
| } | |
| } | |
| } | |
| } | |
| } | |
| document.addEventListener('DOMContentLoaded', function() { | |
| modifyImgTags(); | |
| removeStickyAsideElement(); | |
| }); | |
| const observer = new MutationObserver((mutations) => { | |
| mutations.forEach((mutation) => { | |
| if (mutation.type === 'childList') { | |
| modifyImgTags(); | |
| removeStickyAsideElement(); | |
| } | |
| }); | |
| }); | |
| observer.observe(document.documentElement, { childList: true, subtree: true }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
