Skip to content

Instantly share code, notes, and snippets.

@obar1
Created September 27, 2022 08:34
Show Gist options
  • Save obar1/ebebdfb6a7cb6d1c25cd061c67fb1a27 to your computer and use it in GitHub Desktop.
Save obar1/ebebdfb6a7cb6d1c25cd061c67fb1a27 to your computer and use it in GitHub Desktop.
trick to drop http:// or https:// from address copied in clipbaord
javascript:(function(){
function executeCopy(th, turl) {
var input = document.createElement('textarea');
document.body.appendChild(input);
input.value = turl.replace(th.concat('//'),'');
input.select();
document.execCommand('Copy');
input.remove(); }
executeCopy(window.location.protocol, window.location.href); })();
@obar1
Copy link
Author

obar1 commented Sep 27, 2022

just save this a bookmark in your browser
image

@obar1
Copy link
Author

obar1 commented Sep 27, 2022

click on it on https://something.com/abc you get something.com/abc in clipboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment