Created
February 28, 2019 16:46
-
-
Save Klemart3D/f7c8dc05a99413ba6ba9d99ad6d91de1 to your computer and use it in GitHub Desktop.
Renamable separator bookmark for Firefox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<?php | |
$isHorz = (@$_GET['t'] == 'horz'); | |
?> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Firefox Renamable Bookmarks Separator</title> | |
<link rel="icon" href="<?php echo $isHorz ? 'horz' : 'vert'; ?>-favicon.ico" type="image/x-icon"> | |
<link rel="stylesheet" href="index.css" /> | |
<script src="node_modules/jquery/dist/jquery.min.js"></script> | |
<script src="node_modules/browser-detect/dist/browser-detect.umd.js"></script> | |
</head> | |
<body> | |
<div id="outer"> | |
<div id="inner"> | |
<div id="alert-container"></div> | |
I'm a <b><?php echo $isHorz ? 'horizontal' : 'vertical'; ?></b> separator. | |
Drag <a class="me" href="" title="Drag me!"><?php echo $isHorz ? '───────────' : ''; ?></a> to your bookmarks <em><?php echo $isHorz ? 'folders' : 'toolbar'; ?></em>.<br><br> | |
For a <b><?php echo $isHorz ? 'vertical' : 'horizontal'; ?></b> separator, click <a href="<?php echo $isHorz ? 'index.php' : 'index.php?t=horz'; ?>">here</a>. | |
<br><br><b>:)</b><br><br><br> | |
</div> | |
</div> | |
<script> | |
const detectedBrowser = browserDetect(); | |
// Chrome 69 bug | |
if (detectedBrowser.name === "chrome" && detectedBrowser.versionNumber >= 69 && detectedBrowser.versionNumber < 70) { | |
$('#alert-container').html(` | |
<div class="alert alert-warning" role="alert"> | |
Unfortunately, due to <a href="https://productforums.google.com/forum/#!topic/chrome/sHG5ntLrdwQ" target="_blank">a bug in Chrome 69</a> you can't drag the "me" button to your bookmarks toolbar. | |
</div>`); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment