Skip to content

Instantly share code, notes, and snippets.

@958
Created June 22, 2011 02:11
Show Gist options
  • Save 958/1039381 to your computer and use it in GitHub Desktop.
Save 958/1039381 to your computer and use it in GitHub Desktop.
[keysnail]プロンプトとアドオンバーの表示をトグルする
style.register(<><![CDATA[
#ks-bottom-separator {
border-top-width: 2px !important;
border-top-style: solid !important;
border-top-color: -moz-use-text-color !important;
-moz-border-top-colors: threedshadow threedhighlight !important;
}
#addon-bar {
border-top: none !important;
-moz-appearance: none !important;
}
]]></>);
if (!my.modifyAddonBar) {
my.modifyAddonBar = true;
let textbox = document.getElementById('keysnail-prompt-textbox');
if (textbox) {
let addonBar = document.getElementById('addon-bar');
let sep = document.createElement('hbox');
sep.id = 'ks-bottom-separator';
addonBar.parentNode.insertBefore(sep, addonBar);
textbox.addEventListener('focus', function(ev) {
addonBar.hidden = true;
}, false);
textbox.addEventListener('blur', function(ev) {
addonBar.hidden = false;
}, false);
}
}
@958
Copy link
Author

958 commented Jun 22, 2011

アドオンバーの高さを適当に設定して、プロンプトと同じ高さにするとより吉

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