The Wayback Machine - https://web.archive.org/web/20221224014617/https://github.com/marcoarment/secondcrack/commit/3fd38dbd5c197fc6cf0247fba728dd2325e2409e
Skip to content
Permalink
Browse files
HTTPS fix
  • Loading branch information
root committed Jan 13, 2016
1 parent dc05cb3 commit 3fd38dbd5c197fc6cf0247fba728dd2325e2409e
Showing 1 changed file with 2 additions and 2 deletions.
@@ -15,10 +15,10 @@
}

$bookmarklet_code = <<<EOF
var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),l=d.location,e=encodeURIComponent;w.location.href='TARGETadd-draft.php?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&EXTRA';
var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),l=d.location,e=encodeURIComponent;w.location.href='TARGET?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&EXTRA';
EOF;

$bookmarklet_code = str_replace('TARGET', (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/', trim($bookmarklet_code));
$bookmarklet_code = str_replace('TARGET', $_SERVER['SCRIPT_URI'], trim($bookmarklet_code));

if (! isset($_GET['u'])) {
?>

0 comments on commit 3fd38db

Please sign in to comment.