Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Allegro - wyłączenie grupowania ofert
- // @namespace http://tampermonkey.net/
- // @version 1.0
- // @author ChatGPT
- // @description Dodaje ?description=1 lub &description=1 do URL
- // @match https://allegro.pl/kategoria/*
- // @match https://allegro.pl/listing?string=*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- // Get the current URL
- const currentUrl = window.location.href;
- // Check if the URL already has the parameter
- const hasDescription = currentUrl.includes('description=1');
- if (!hasDescription) {
- let newUrl;
- if (currentUrl.includes('?')) {
- // If the URL already has query parameters, append &description=1
- newUrl = `${currentUrl}&description=1`;
- } else {
- // Otherwise, add ?description=1
- newUrl = `${currentUrl}?description=1`;
- }
- // Redirect to the new URL
- window.location.href = newUrl;
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement