| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Original HTTPS Page] |
Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.
You must be logged in to block users.
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abuseSource control utility. Diffs and run actions at any change in a directory.
// Bookmarklet
javascript:void (()=>{let e="";try{document.designMode="on",onmouseup=()=>{document.execCommand("backColor",!1,"chartreuse"),window.getSelection().removeAllRanges()};var n=/^\s*('|")/;[...document.styleSheets].forEach((t=>{[...t.rules].forEach((t=>{var o,c;e+=(o=t.cssText,c=function(e){var n;(n=e,fetch(n).then((e=>e.blob())).then((e=>new Promise(((n,t)=>{const o=new FileReader;o.onloadend=()=>n(o.result),o.onerror=console.log(n,t),o.readAsDataURL(e)}))))).then((e=>{console.log("RESULT:",e)}))},[/(@import\s+)(')(.+?)(')/gi,/(@import\s+)(")(.+?)(")/gi,/(url\s*\()(\s*')([^']+?)(')/gi,/(url\s*\()(\s*")([^"]+?)(")/gi,/(url\s*\()(\s*)([^\s'")].*?)(\s*\))/gi].reduce((function(e,t,o){return e.replace(t,(function(e,t,o,r,s){var a=c(r);return console.log(t,o,a,s),n.test(a)&&n.test(o)&&(o=s=""),t+o+a+s}))}),o))}))})),[...document.querySelectorAll("link")].forEach((e=>{e.outerHTML=""})),[...document.querySelectorAll("source")].forEach((e=>{var n;(n=e.src,fetch(n).then((e=>e.blob())).then((e=>new Promise(((n,t)=>{const o=new FileReader;o.onloadend=()=>n(o.result),o.onerror=t,o.readAsDataURL(e)}))))).then((n=>{console.log("RESULT SRC SOURCE:",n),e.src=n,e.srcset=""}))})),[...document.querySelectorAll("iframe")].forEach((e=>{e.sandbox="",e.src=""})),[...document.querySelectorAll("img")].forEach((e=>{var n;(n=e.src,fetch(n).then((e=>e.blob())).then((e=>new Promise(((n,t)=>{const o=new FileReader;o.onloadend=()=>n(o.result),o.onerror=t,o.readAsDataURL(e)}))))).then((n=>{console.log("RESULT:",n),e.src=n}))})),document.body.appendChild(Object.assign(document.createElement("style"),{textContent:e.split('url("undefined")').join("")})),document.head.appendChild(Object.assign(document.createElement("base"),{href:new URL(document.URL).origin})),document.head.appendChild(Object.assign(document.createElement("meta"),{httpEquiv:"Content-Security-Policy",content:"object-src 'none'; connect-src 'none' default-src 'none'; script-src 'none'; connect-src 'none'; img-src 'none'; style-src 'none'; base-uri 'none';form-action 'none'"})),document.head.appendChild(Object.assign(document.createElement("meta"),{httpEquiv:"X-Frame-Options",content:"deny"})),document.head.prepend(Object.assign(document.createComment("\n\n-- Page dumped using %F0%9F%92%BERePack bookmarklet https://gist.github.com/webdev23/0fc20feb866aaad04a515fbfae419a7c\n-- From url "+document.URL+"\n\n"),{})),[...document.scripts].forEach((e=>{e.outerHTML=""})),[...document.querySelectorAll("img")].forEach((e=>{0!=e.src.indexOf("http://")&&0!=e.src.indexOf("https://")||(e.src="")})),setTimeout((function(){let e=document.createElement("a");e.download="%F0%9F%92%BE_"+new URL(document.location.href).origin+"_"+document.title+".html",e.href=URL.createObjectURL(new Blob([document.documentElement.outerHTML])),document.designMode="off",e.click()}),1e4)}catch(e){alert("Error, offline.\nThis page has very strict Cross Origin Sharing Policies (CORS)\nand or Content Security Policies (CSP) against Cross Site Scripting (X-XSS-Protection mode block).\nThe download of assets can't succeed from a browser context.\n:(\n"+e.message)}})();
###The target:
Saving a web page that works offline into a single file, create fully static HTML pages with embedded assets.
| Back | FazBrowse Home | New Git URL |