Created
January 6, 2022 08:27
-
-
Save Far-Se/a4fab6cf366319d5ec52f067afcf7519 to your computer and use it in GitHub Desktop.
Pricy Checker Tampermonkey
This file contains 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 Pricy Check Price | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.emag.ro/* | |
// #match https://*/* | |
// @icon https://www.google.com/s2/favicons?domain=emag.ro | |
// @run-at context-menu | |
// ==/UserScript== | |
const currentUrl = encodeURIComponent(window.location.href.split('?')[0]); | |
const title = window.document.title; | |
const url = `https://www.pricy.ro/extensionhtml?url=${currentUrl}&title=${title}&v=4.5.1-Chrome`; | |
document.body.insertAdjacentHTML('beforeend',`<div id="pricy"><div id="close" onclick="document.querySelector('#pricy').outerHTML=''">X</div><iframe src="${url}"></div>`); | |
document.body.insertAdjacentHTML('beforeend',`<style> | |
div#pricy { | |
position: fixed; | |
left: 0; | |
top: 0; | |
z-index: 999999; | |
width: 26vw; | |
height: 34vh; | |
resize: both; | |
overflow: auto; | |
} | |
#pricy iframe { | |
width: 100%; | |
height: 100%; | |
} | |
#pricy div#close { | |
position: absolute; | |
background: red; | |
padding: 0px 5px; | |
font-weight: bold; | |
border: 1px solid black; | |
right: 0px; | |
font-size: 18px; | |
cursor: pointer; | |
} | |
</style>`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment