How to avoid New Tab page with it's Firefox ads please?

User Help for Mozilla Firefox
User avatar
madmudmob
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Re: How to avoid New Tab page with it's Firefox ads please?

Post by madmudmob »

I came across this page which is great for hiding stuff in the context menu with this page ....
https://www.reddit.com/r/firefox/commen ... text_menu/

then following it's link to .....
https://imgur.com/b5gEfUy

using this .....

Code: Select all

#context-sep-navigation, #context-savepage, #context-selectall, #context-viewinfo, #context-sendpagetodevice, #context-viewbgimage, #context-viewsource, #context-inspect, #context-viewwindow, #context-KillIt, #screenshots_mozilla_org_create-screenshot, #ublockU_raymondhill_net_ublockO-blockElement, #concept-sep-navigation, #concept-sep-sendpagetodevice, #concept-sep-viewbgimage, #concept-sep-navigation,  #concept-sep-viewsource, #inspect-separator, #context-bookmarkpage
 { 
    display: none !important 
}
but I can't seem to hide one Add-on .... Kill It:
https://addons.mozilla.org/en-US/firefox/addon/kill-it/

any idea please?
Last edited by madmudmob on January 30th, 2018, 6:01 am, edited 1 time in total.
Mud is good!
User avatar
BuddhaNature
Posts: 537
Joined: January 3rd, 2008, 9:44 am
Location: Scotland

Re: How to avoid New Tab page with it's Firefox ads please?

Post by BuddhaNature »

I just tried that code you provide from Frank, MMM with the following, I thought, "buggy" results:

(1) I have FF setup to automatically show one webpage on launch, Startpage (search engine). When it does so the webpage does show correctly. However, there is no actual tab displayed for that "active" tab. To get that tab to show I need to click on the "New Tab" (big "+" sign). When I click on that I get two tabs displayed: one for Startpage, that other a New tab page.

(2) If I then click to close the New Tab then the New Tab disappears (as expected). However, the Startpage tab also disappears again (though leaving the actual Startpage webpage still displayed).

Kind of weird behaviour I think.
OS: Windows 10 Pro. x64
User avatar
madmudmob
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Re: How to avoid New Tab page with it's Firefox ads please?

Post by madmudmob »

Ah, maybe it was because I left out the original page I got it from which I have edited my post to include?

That said if you say it is buggy then it is :)
Mud is good!
User avatar
BuddhaNature
Posts: 537
Joined: January 3rd, 2008, 9:44 am
Location: Scotland

Re: How to avoid New Tab page with it's Firefox ads please?

Post by BuddhaNature »

I'm not an expert so I can't really say - just acts kind of weird, seems kind of buggy to me. I have no need for the code myself, just tested out of curiosity.

P.S. I don't see any link to the originating thread for Frank's code.
OS: Windows 10 Pro. x64
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: How to avoid New Tab page with it's Firefox ads please?

Post by smsmith »

BuddhaNature wrote:I just tried that code you provide from Frank, MMM with the following, I thought, "buggy" results:

(1) I have FF setup to automatically show one webpage on launch, Startpage (search engine). When it does so the webpage does show correctly. However, there is no actual tab displayed for that "active" tab. To get that tab to show I need to click on the "New Tab" (big "+" sign). When I click on that I get two tabs displayed: one for Startpage, that other a New tab page.

(2) If I then click to close the New Tab then the New Tab disappears (as expected). However, the Startpage tab also disappears again (though leaving the actual Startpage webpage still displayed).

Kind of weird behaviour I think.
I'm fairly certain that's what the intended behavior for that code is. Hides the tab bar if there is only one tab open. Once you have a second tab, the tab bar is displayed. It's meant for people that prefer to use windows instead of tabs, so have no use for the tab bar.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
BuddhaNature
Posts: 537
Joined: January 3rd, 2008, 9:44 am
Location: Scotland

Re: How to avoid New Tab page with it's Firefox ads please?

Post by BuddhaNature »

smsmith wrote:I'm fairly certain that's what the intended behavior for that code is.
Okay, I was just making a guesstimate judgement on what I thought the code's intended behaviour should be. Apologies to Frank if he read that and was offended.
OS: Windows 10 Pro. x64
User avatar
madmudmob
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Re: How to avoid New Tab page with it's Firefox ads please?

Post by madmudmob »

BuddhaNature, I'm fairly sure Frank Lion gave me the code in this thread ....
http://forums.mozillazine.org/viewtopic ... &t=3037401
Mud is good!
User avatar
madmudmob
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Re: How to avoid New Tab page with it's Firefox ads please?

Post by madmudmob »

I have hidden many of the bits in the Context menu (even the uBlock icon) but am still stuck on one ......

The Context Menu icon for the add-on Kill It:
https://addons.mozilla.org/en-US/firefox/addon/kill-it/

It's frustrating being so close to perfection only to be blocked by one menu entry.

Could one of you fine techy folks help me please?
Mud is good!
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: How to avoid New Tab page with it's Firefox ads please?

Post by smsmith »

Code: Select all

menuitem.menuitem-iconic[label="Kill It"] > .menu-iconic-left {
  opacity: 0 !important;
}
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
madmudmob
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Re: How to avoid New Tab page with it's Firefox ads please?

Post by madmudmob »

Thankyou, smsmith.

Popped it in my userChrome.css file and saved then restarted Firefox but the little blighter is still showing?
Mud is good!
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: How to avoid New Tab page with it's Firefox ads please?

Post by smsmith »

Might be something wrong in the rest of the file. Like you didn't close a piece of code with a curly bracket, missed a semicolon, etc. If your file is long, PM it to me and I'll look it over. If it's shorter, post it here.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
madmudmob
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Re: How to avoid New Tab page with it's Firefox ads please?

Post by madmudmob »

Thankyou - that's so kind of you. Not sure how much would count as long so I'll pop it here and can remove it if you suggest I should ......

Code: Select all

/*AGENT_SHEET*/

/* Firefox 57+ userChrome.css tweaks ****************************************************/
/* code mostly taken from 'Classic Theme Restorer' & 'Classic Toolbar Buttons' add-ons **/
/* by Aris (aris-addons@gmx.net)*********************************************************/
/* Github: https://github.com/aris-t2/customcssforfx ************************************/
/****************************************************************************************/

.searchbar-textbox, #urlbar {
  border-radius: 20px !important;
}

/**/










/*AGENT_SHEET*/

/* Firefox 57+ userChrome.css tweaks ****************************************************/
/* code mostly taken from 'Classic Theme Restorer' & 'Classic Toolbar Buttons' add-ons **/
/* by Aris (aris-addons@gmx.net)*********************************************************/
/* Github: https://github.com/aris-t2/customcssforfx ************************************/
/****************************************************************************************/


/* move star-button to boxes last position */
#star-button-box{
  -moz-box-ordinal-group: 100 !important;
}

/**/









/* hide toolbar borders */
toolbar {
  -moz-appearance: none !important;
  border-left: 0px !important;
  border-right: 0px !important;
  border-bottom: 0px !important;
  border-top: 0px !important;
}









#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme) {
    margin-bottom: -1px !important;
}










 */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */


@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Firefox userChrome.css */

/* This will remove the current "line" above the active tab */
.tab-line {
  visibility: hidden !important;
}
/* Color of ACTIVE tab - #E3E3E3 is just a sample */
.tab-background[selected="true"] {
  background-color: #E3E3E3 !important;
  background-image: none !important;
}
/* Color of ACTIVE tab TEXT & bold or not bold. You can use a color code instead of "white" here if you wish. */
.tabbrowser-tab[selected] .tab-label {
  color: black !important;
  font-weight: bold !important;
/* font-weight: normal !important; (for regular text) */
}
 









 */
 
#tabbrowser-tabs { min-height: 0px !important;}
 
#tabbrowser-tabs tab[first-tab='true'][last-tab='true'] { display:none !important; }

/* Theme Fix - you only need these next 2 lines if your theme doesn't look right
...just uncomment them to use.............

#TabsToolbar { border : none !important;}
#TabsToolbar { min-height: 0px !important;}*/









/* Firefox - Remove borders/gradients on tab/nav bars
 * (c) 2014 Scott Zeid <s.zeid.me>.  X11 License.
 *
 * For use with the default Firefox Australis theme.
 *
 */

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

/** Tab bar bottom border **/

/* Pre-Australis */

#nav-bar {
 margin-top: -1px !important;
}

#PersonalToolbar ~ #TabsToolbar {
 padding-bottom: 0 !important;
 box-shadow: none !important;
}

/* Australis */

#main-window #TabsToolbar ~ toolbar#nav-bar {
 margin-top: -1px !important;
 border-top: 1px solid transparent !important;  /* Firefox 32+ */
}

#TabsToolbar::after {
 border-bottom-color: transparent !important;
}

/** End Tab bar bottom border **/

/** Nav bar top border **/

/* Australis only */

#TabsToolbar ~ #nav-bar,
#verticaltabs-box ~ * #nav-bar {
 box-shadow: none !important;
}

/** End Nav bar top border **/

/** Nav bar bottom border **/

:disabled {}

/** End Nav bar bottom border **/

/* Nav bar background */

/* Both Australis and pre-Australis */

#nav-bar {
 background: none !important;
}

/** End Nav bar background **









/* hide toolbar borders */
toolbar {
  -moz-appearance: none !important;
  border-left: 0px !important;
  border-right: 0px !important;
  border-bottom: 0px !important;
  border-top: 0px !important;
}







menuitem.menuitem-iconic[label="Kill It"] > .menu-iconic-left {
  opacity: 0 !important;
}
Mud is good!
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: How to avoid New Tab page with it's Firefox ads please?

Post by smsmith »

Still reviewing, but at first pass, you have the @namespace line multiple times. It only needs to be in the file once. At the very top. Remove all instances and put it at the very top of the file before any code block.

@namespace url(http://www.mozilla.org/keymaster/gateke ... s.only.xul);

Also, you have several instances of */ randomly showing up, but no /* to "begin a comment section". Find all those places and remove them.

Uhh... and when I import your code into my userChrome file, it, uhm, works for me. :P

Does the menu item in your menu read as "Kill It" (without the quotes) or as something else? Given you are probably using en-GB rather than en-US like me, yours is probably more proper and says something link "Dispose of it, please, if you would, old chap".
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
madmudmob
Posts: 810
Joined: August 30th, 2006, 7:34 am
Location: Somerset, UK

Re: How to avoid New Tab page with it's Firefox ads please?

Post by madmudmob »

Will set about doing as you so kindly suggest and the add-on is just Kill It ... yep, am on GB rather than US
Mud is good!
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: How to avoid New Tab page with it's Firefox ads please?

Post by smsmith »

Well that's just weird, then. I was beginning to suspect it was working for me and not you because I was using a Nightly build, so I switched to release and it is working for me there, too. And just to be clear, we are talking about the icon for the menu item Kill It in the menu that pops up when you right click the page or an image or whatever.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
Post Reply