Initial commit
This commit is contained in:
49
pvprp.js
Normal file
49
pvprp.js
Normal 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}`)
|
||||
}
|
||||
Reference in New Issue
Block a user