cohenerickson / Velocity

Velocity is a fully featured tabbed proxy with a seamless browsing experience.
https://velocity.radon.games
GNU Affero General Public License v3.0
139 stars 335 forks source link

About:blank cloaking #13

Closed makingstuffup closed 1 year ago

makingstuffup commented 1 year ago

Could you please add about:blank cloaking and sorry for the disturbance

retronbv commented 1 year ago

This will do the trick if you add it to src/components/Utility.tsx after L102 (it adds a popout button in the toolbar)

<div
   class="h-8 w-8 rounded hover:bg-[#6E6E79] flex items-center justify-center"
   onClick={() => {
   let tab = Array.from(tabStack())[0];
   let w = window.open();
   w!.document.body.style.margin = "0";
   w!.document.body.style.height = "100vh";
   w!.document.title = tab.title();
   let link = window.document.createElement("link");
   link.rel = "icon";
   w!.document.getElementsByTagName("head")[0].appendChild(link);
   link.href = tab.icon();
   var iframe = w!.document.createElement("iframe");
   iframe.style.border = "none";
   iframe.style.width = "100%";
   iframe.style.height = "100%";
   iframe.style.margin = "0";
   iframe.referrerPolicy = "no-referrer";
   iframe.allow = "fullscreen";
   iframe.src = tab?.iframe.src;
   w!.document.body.appendChild(iframe);
   }}
   >
   <i class="fa-light mt-[2px] fa-arrow-up-right-from-square"></i>
</div>
cohenerickson commented 1 year ago

After thinking about this some more, this is out of scope of Velocity's goals. This is a very simple thing for someone to implement into a fork if they would like.