{"action":"created","issue":{"url":"https://api.github.com/repos/Aris-t2/CustomJSforFx/issues/1","repository_url":"https://api.github.com/repos/Aris-t2/CustomJSforFx","labels_url":"https://api.github.com/repos/Aris-t2/CustomJSforFx/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Aris-t2/CustomJSforFx/issues/1/comments","events_url":"https://api.github.com/repos/Aris-t2/CustomJSforFx/issues/1/events","html_url":"https://github.com/Aris-t2/CustomJSforFx/issues/1","id":362571997,"node_id":"MDU6SXNzdWUzNjI1NzE5OTc=","number":1,"title":"[Experiment] One-liner toolbar script - move buttons and location bar to tabs toolbar","user":{"login":"Aris-t2","id":6013569,"node_id":"MDQ6VXNlcjYwMTM1Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/6013569?v=4","gravatar_id":"","url":"https://api.github.com/users/Aris-t2","html_url":"https://github.com/Aris-t2","followers_url":"https://api.github.com/users/Aris-t2/followers","following_url":"https://api.github.com/users/Aris-t2/following{/other_user}","gists_url":"https://api.github.com/users/Aris-t2/gists{/gist_id}","starred_url":"https://api.github.com/users/Aris-t2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aris-t2/subscriptions","organizations_url":"https://api.github.com/users/Aris-t2/orgs","repos_url":"https://api.github.com/users/Aris-t2/repos","events_url":"https://api.github.com/users/Aris-t2/events{/privacy}","received_events_url":"https://api.github.com/users/Aris-t2/received_events","type":"User","site_admin":false},"labels":[{"id":1064646260,"node_id":"MDU6TGFiZWwxMDY0NjQ2MjYw","url":"https://api.github.com/repos/Aris-t2/CustomJSforFx/labels/discussion","name":"discussion","color":"cc209b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-09-21T11:25:24Z","updated_at":"2019-09-12T06:51:09Z","closed_at":null,"author_association":"OWNER","body":"'One-liner' script for Firefox 60+ by Aris\r\n\r\n![123](https://user-images.githubusercontent.com/6013569/45880668-0d982e80-bda9-11e8-9f24-d4804b1bfc58.png)\r\n\r\n- **CAUTION: moving some of the items into palette will break your ui!**\r\n- buttons back and forward are moved to tab toolbars start position\r\n- location bar is placed after tabs\r\n- main menu button is placed at tab toolbars end\r\n- own buttons can be added between location bar and overflow button\r\n- navigation toolbar is only visible in customizing mode (optional)\r\n- space at tab toolbars start and end is hidden (optional)\r\n- location bar width is forced to 40% of window width (optional)\r\n\r\n```js\r\n// 'One-liner' script for Firefox 60+ by Aris\r\n// buttons back and forward are moved to tab toolbars start position\r\n// location bar is placed after tabs\r\n// main menu button is placed at tab toolbars end\r\n// own buttons can be added between location bar and overflow button\r\n// navigation toolbar is only visible in customizing mode (optional)\r\n// space at tab toolbars start and end is hidden (optional)\r\n// location bar width is forced to 40% of window width (optional)\r\n// CAUTION: moving some of the items into palette will break your ui!\r\n\r\nvar {Services} = Components.utils.import(\"resource://gre/modules/Services.jsm\", {});\r\nvar {CustomizableUI} = Components.utils.import(\"resource:///modules/CustomizableUI.jsm\", {});\r\nvar sss = Components.classes[\"@mozilla.org/content/style-sheet-service;1\"].getService(Components.interfaces.nsIStyleSheetService);\r\n\r\nvar Oneliner = {\r\n  init: function() {\r\n\r\n\tdocument.getElementById('back-button').setAttribute('removable','true');\r\n\tdocument.getElementById('forward-button').setAttribute('removable','true');\r\n\tdocument.getElementById('PanelUI-button').setAttribute('removable','true');\r\n\tdocument.getElementById('nav-bar-overflow-button').setAttribute('removable','true');\r\n\tdocument.getElementById('urlbar-container').setAttribute('removable','true');\r\n\t\r\n\tCustomizableUI.addWidgetToArea(\"back-button\", CustomizableUI.AREA_TABSTRIP);\r\n\tCustomizableUI.addWidgetToArea(\"forward-button\", CustomizableUI.AREA_TABSTRIP);\r\n\tCustomizableUI.addWidgetToArea(\"urlbar-container\", CustomizableUI.AREA_TABSTRIP);\r\n\tCustomizableUI.addWidgetToArea(\"nav-bar-overflow-button\", CustomizableUI.AREA_TABSTRIP);\r\n\tCustomizableUI.addWidgetToArea(\"PanelUI-button\", CustomizableUI.AREA_TABSTRIP);\r\n\t\r\n\tCustomizableUI.moveWidgetWithinArea(\"urlbar-container\",0);\r\n\tCustomizableUI.moveWidgetWithinArea(\"alltabs-button\",0);\r\n\tCustomizableUI.moveWidgetWithinArea(\"new-tab-button\",0);\r\n\tCustomizableUI.moveWidgetWithinArea(\"tabbrowser-tabs\",0);\r\n\tCustomizableUI.moveWidgetWithinArea(\"forward-button\",0);\r\n\tCustomizableUI.moveWidgetWithinArea(\"back-button\",0);\r\n\tCustomizableUI.moveWidgetWithinArea(\"nav-bar-overflow-button\",499);\r\n\tCustomizableUI.moveWidgetWithinArea(\"PanelUI-button\",500);\r\n\t\r\n\tdocument.getElementById(\"TabsToolbar\").insertBefore(document.getElementById(\"nav-bar-overflow-button\"),null);\r\n\tdocument.getElementById(\"TabsToolbar\").insertBefore(document.getElementById(\"PanelUI-button\"),null);\r\n\t\r\n  // style button icon\r\n  var uri = Services.io.newURI(\"data:text/css;charset=utf-8,\" + encodeURIComponent('\\\r\n\t\\\r\n\t  /* hide navigation toolbar */\\\r\n\t  #main-window:not([customizing]) #nav-bar {\\\r\n\t\tposition: fixed !important; \\\r\n\t\tmargin-top: -100px !important; \\\r\n\t  }\\\r\n\t  /* adjust popup position */\\\r\n\t  #PopupAutoCompleteRichResult[autocompleteinput=\"urlbar\"] { \\\r\n\t\tmargin-top: 65px !important; \\\r\n\t  } \\\r\n\t  /* hide empty space on tabs toolbars start */\\\r\n\t  #main-window:not([customizing]) #TabsToolbar *[type=\"pre-tabs\"] {\\\r\n\t\tvisibility: collapse; \\\r\n\t  }\\\r\n\t  /* hide empty space on tabs toolbars end */\\\r\n\t  #main-window:not([customizing]) #TabsToolbar *[type=\"post-tabs\"] {\\\r\n\t\tvisibility: collapse; \\\r\n\t  }\\\r\n\t  /* location bar width (40% of window width) */\\\r\n\t  #main-window:not([customizing]) #urlbar-container {\\\r\n\t\tmin-width: 40vw !important; \\\r\n\t\twidth: 40vw !important; \\\r\n\t\tmax-width: 40vw !important; \\\r\n\t  }\\\r\n\t  /* display overflow button */\\\r\n\t  toolbar:not([overflowing]) > .overflow-button, \\\r\n\t  toolbar[customizing] > .overflow-button { \\\r\n\t\tdisplay: -moz-box !important; \\\r\n\t  } \\\r\n\t\\\r\n  '), null, null);\r\n  \r\n  sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);\r\n\t\r\n  }\r\n\r\n}\r\n\r\nsetTimeout(function(){\r\n  Oneliner.init();\r\n},500);\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/Aris-t2/CustomJSforFx/issues/comments/530691345","html_url":"https://github.com/Aris-t2/CustomJSforFx/issues/1#issuecomment-530691345","issue_url":"https://api.github.com/repos/Aris-t2/CustomJSforFx/issues/1","id":530691345,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMDY5MTM0NQ==","user":{"login":"Aris-t2","id":6013569,"node_id":"MDQ6VXNlcjYwMTM1Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/6013569?v=4","gravatar_id":"","url":"https://api.github.com/users/Aris-t2","html_url":"https://github.com/Aris-t2","followers_url":"https://api.github.com/users/Aris-t2/followers","following_url":"https://api.github.com/users/Aris-t2/following{/other_user}","gists_url":"https://api.github.com/users/Aris-t2/gists{/gist_id}","starred_url":"https://api.github.com/users/Aris-t2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aris-t2/subscriptions","organizations_url":"https://api.github.com/users/Aris-t2/orgs","repos_url":"https://api.github.com/users/Aris-t2/repos","events_url":"https://api.github.com/users/Aris-t2/events{/privacy}","received_events_url":"https://api.github.com/users/Aris-t2/received_events","type":"User","site_admin":false},"created_at":"2019-09-12T06:51:09Z","updated_at":"2019-09-12T06:51:09Z","author_association":"OWNER","body":"More results in location bar:\r\n`about:config > browser.urlbar.maxRichResults` increase value, restart browser.\r\n\r\nRemove history entries from results:\r\nSettings > Privacy & Security > Address Bar"}}
{"actor":{"display_login":"Aris-t2"}}