-
Notifications
You must be signed in to change notification settings - Fork 23
/
bookmarkButtonLite.uc.xul
85 lines (80 loc) · 4.12 KB
/
bookmarkButtonLite.uc.xul
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0"?>
<!DOCTYPE overlay [
<!ENTITY % mainwindowDTD SYSTEM "chrome://browser/locale/browser.dtd">
%mainwindowDTD;
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
%placesDTD;
]>
<overlay id="classic-bookmark-button-lite-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
// ==UserScript==
// @name bookmarkButtonlite.uc.xul
// @description
// @include main
// @include chrome://browser/content/places/places.xul
// @include chrome://browser/content/bookmarks/bookmarksPanel.xul
// @author lastdream2013
// @version 0.11
// ==/UserScript==
-->
<script type="application/x-javascript" xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
(function () {
//css
document.insertBefore(document.createProcessingInstruction('xml-stylesheet','type="text/css" href="data:text/css;utf-8,' + encodeURIComponent(
'\
#classic-bookmark-toolbar-button-lite > .toolbarbutton-icon {\
max-width: 18px !important;\
padding: 0 !important;\
margin: 0 !important;\
}\
#classic-bookmark-toolbar-button-lite dropmarker{display: none !important;}\
')+ '"'), document.documentElement);
})();
]]></script>
<toolbarpalette id="nav-bar">
<toolbarbutton id="classic-bookmark-toolbar-button-lite" insertbefore="urlbar-container"
image= "chrome://browser/skin/places/allBookmarks.png"
style = "-moz-appearance: none !important;border-style: none !important;border-radius: 0 !important;padding: 0 2px !important;margin: 0 !important;background: transparent !important;box-shadow: none !important;-moz-box-align: center !important;-moz-box-pack: center !important;min-width: 18px !important;min-height: 18px !important;"
type="menu"
class="toolbarbutton-1 chromeclass-toolbar-additional"
persist="class"
removable="true"
label="&bookmarksMenuButton.label;"
tooltiptext="&bookmarksMenuButton.tooltip;"
ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
ondragover="PlacesMenuDNDHandler.onDragOver(event);"
ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
ondrop="PlacesMenuDNDHandler.onDrop(event);"
oncommand="BookmarksMenuButton.onCommand(event);">
<menupopup id="BMB_bookmarksPopup"
placespopup="true"
context="placesContext"
openInTabs="children"
oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
onpopupshowing="BookmarksMenuButton.onPopupShowing(event);
if (!this.parentNode._placesView)
new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
tooltip="bhTooltip" popupsinherittooltip="true">
<menu id="BMB_bookmarksToolbar"
placesanonid="toolbar-autohide"
class="menu-iconic bookmark-item"
label="&personalbarCmd.label;"
container="true">
<menupopup id="BMB_bookmarksToolbarPopup"
placespopup="true"
context="placesContext"
onpopupshowing="if (!this.parentNode._placesView)
new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
</menu>
<menuseparator/>
<!-- Bookmarks menu items -->
<menuseparator builder="end"
class="hide-if-empty-places-result"/>
<menuitem id="BMB_unsortedBookmarks"
label="&bookmarksMenuButton.unsorted.label;"
oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
class="menuitem-iconic"/>
</menupopup>
</toolbarbutton>
</toolbarpalette>
</overlay>