-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcex.js
More file actions
24 lines (21 loc) · 858 Bytes
/
cex.js
File metadata and controls
24 lines (21 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// ==UserScript==
// @name CEX URL Filter
// @namespace http://tampermonkey.net/
// @version 1
// @description Añade automáticamente filtros de disponibilidad a la URL de CEX
// @author LinxESP
// @match https://es.webuy.com/search*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
// Verificar si la URL ya contiene el parámetro de disponibilidad
if (!window.location.href.includes('availability=')) {
// Construir la nueva URL con el parámetro de disponibilidad
const separator = window.location.href.includes('?') ? '&' : '?';
const newUrl = window.location.href + separator + "availability=Disponible+online~Disponible+en+tienda";
// Redirigir a la nueva URL
window.location.href = newUrl;
}
})();