Copied a JavaScript 10 years ago from somewhere what I been using to track certain elements found on a website. The webpage where information is collected are required 2 factors authentication so passing information is complicated. Back in the days decided to just use a JavaScript to send the entirety webpage from the user device to a php page where php looks for certain elements and extract information. The JavaScript saved on the user smartphones and when logged in to the website the user select the bookmark. Very simple concept but stoped working yesterday.
The code based on this found in a article what is still working but the modified wersion not working anymore.
“Working fine to display page source”
javascript: (function() {
var a = window.open('about:blank').document;
a.write('Source of ' + location.href + '');
a.close();
var b = a.body.appendChild(a.createElement('pre'));
b.style.overflow = 'auto';
b.style.whiteSpace = 'pre-wrap';
b.appendChild(a.createTextNode(document.documentElement.innerHTML))
})();
No longer working, getting error 413.
javascript: (function() {
var d = window.open('about:blank'),
a = d.document;
a.write('<!DOCTYPE html><html><head><title>Loading Source</title></head><body></body></html>');
a.close();
var b = a.body.appendChild(a.createElement('form'));
b.setAttribute('method', 'post');
b.setAttribute('action', 'https://webpageextract/extraction.php/?uri=' + location.href);
var c = b.appendChild(a.createElement('input'));
c.setAttribute('type', 'hidden');
c.setAttribute('name', 'DOM');
c.setAttribute('value', encodeURIComponent(document.documentElement.innerHTML));
b.submit()
})()