Initial commit

This commit is contained in:
2025-05-26 00:01:52 +02:00
commit 46b8b8a285
7 changed files with 120 additions and 0 deletions

49
pvprp.js Normal file
View File

@@ -0,0 +1,49 @@
log("Loaded extension")
const downloadButton = document.querySelector('a.activ-download')
const originalHref = downloadButton.href;
const originalTarget = downloadButton.getAttribute('target');
const originalWindowOpen = window.open;
const originalAssign = window.location.assign;
const originalReplace = window.location.replace;
window.open = function() {
log('Intercepted window.open with:', arguments);
return { closed: false };
};
window.location.assign = function(url) {
log('Intercepted location.assign with:', url);
};
window.location.replace = function(url) {
log('Intercepted location.replace with:', url);
};
downloadButton.removeAttribute('target');
downloadButton.href = 'javascript:void(0)';
const clickHandler = downloadButton["click"];
if (typeof clickHandler === 'function') {
try {
clickHandler.call(downloadButton);
} catch (e) {
error('Error executing click handler:', e);
}
}
downloadButton.href = originalHref;
if (originalTarget) {
downloadButton.setAttribute('target', originalTarget);
}
window.open = originalWindowOpen;
window.location.assign = originalAssign;
window.location.replace = originalReplace;
function log(msg) {
console.log(`[PvPRp Bypass]: ${msg}`)
}
function error(msg) {
console.error(`[PvPRp Bypass]: ${msg}`)
}