Skip to content

Instantly share code, notes, and snippets.

@GoldraK
Last active October 18, 2021 09:23
Show Gist options
  • Save GoldraK/61b951c98558ab2da1e156b45e1c1a93 to your computer and use it in GitHub Desktop.
Save GoldraK/61b951c98558ab2da1e156b45e1c1a93 to your computer and use it in GitHub Desktop.
javascript:(function () { if (location.hostname !== 'elpais.com') { location.href = 'https://elpais.com/'; } if (localStorage) { const serializedArcp = localStorage.getItem('ArcP'); if (serializedArcp && serializedArcp.length > 0) { const arcp = JSON.parse(serializedArcp); arcp.anonymous.rc[Object.keys(arcp.anonymous.rc)[0]].c = -200; localStorage.setItem('ArcP', JSON.stringify(arcp)); location.reload(); } } })();
@LuisMayo
Copy link

Propongo hacer un par de cambios

Concretamente:
Sólo navegar a elpais.com si no estamos ya en dicho sitio web.

Recargar la página tras modificar el localstorage para que los cambios se hagan efectivos de inmediato

Quedaría tal que así

javascript:(function() { if(location.hostname !== 'elpais.com') {location.href= 'https://elpais.com/';} if(localStorage) { const serializedArcp = localStorage.getItem('ArcP'); if (serializedArcp && serializedArcp.length > 0) { const arcp = JSON.parse(serializedArcp); arcp.anonymous.rc['8'].c = -200; localStorage.setItem('ArcP', JSON.stringify(arcp)); location.reload();} } })();

@GoldraK
Copy link
Author

GoldraK commented Aug 17, 2020

Grande 👏 👏

@idkg-vibes
Copy link

Hola buenas, han modificado el sistema, ARCP ya no es visible, esta solucion aun funciona?

@LuisMayo
Copy link

No está oculto, simplemente han cambiado el nombre de la propiedad de "8" a "15". Pero al margen de eso todo va exactamente igual

Para arreglarlo basta con cambiar el 8 al 15, pero para curarnos en salud lo que he hecho es cambiarlo para que entre a la propiedad tenga el nombre que tenga

javascript:(function () { if (location.hostname !== 'elpais.com') { location.href = 'https://elpais.com/'; } if (localStorage) { const serializedArcp = localStorage.getItem('ArcP'); if (serializedArcp && serializedArcp.length > 0) { const arcp = JSON.parse(serializedArcp); arcp.anonymous.rc[Object.keys(arcp.anonymous.rc)[0]].c = -200; localStorage.setItem('ArcP', JSON.stringify(arcp)); location.reload(); } } })();

@GoldraK
Copy link
Author

GoldraK commented Oct 18, 2021

Es como dice @LuisMayo gracias por el arreglo lo pongo arriba.

@idkg-vibes
Copy link

idkg-vibes commented Oct 18, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment