Hiding LiveJournal ads with user stylesheets

From No LJ Ads Wiki

Jump to: navigation, search
This article contains CSS meant to be used with the guide on User Stylesheets.


Warning: This guide will only hide the ads from your view, not block them or prevent them from showing on your journal to others. If you want to protect yourself from malware or cookie tracking, you should look at guides like Using AdBlock and AdBlock Plus, CookieSafe, NoScript, and Blocking Flash from automatically loading. If you have a Plus account and you want to turn the ads off, see our guide on Switching from Plus to Basic.


Here is a guide to using browser side CSS to block the display of ads on LiveJournal. Please note that this only hides the ads from view; they load but are hidden. If you only want to hide the ads from view, but let them load so that LiveJournal gets the advantage of the ad impression, this will let you do that.

However, there can be security risks associated with letting all of the ads load, such as malware, so we do not recommend using this method alone. Use it if you cannot use Adblock Plus and have to settle for Adblock, or if you are blocking flash from automatically loading. If you are willing to keep an updated hosts file, you can also try Blocking Ads with a Hosts File.

We do not aim, in any way or form, at providing solutions for Plus users who would like to remove ads from display on their journal or change the way they are displayed. Preventing the display of ads on the style itself (as opposed to browser-side ad blocking) is a violation of the Terms of Service. Plus users who want to get rid of ads can switch from Plus to Basic if their account was created before March 12th, 2008; otherwise, ad blocking is the only option.

Contents

[edit] CSS for User Stylesheets

[edit] Premade Downloadable CSS Files

You can save these to where you need and rename them to the proper filename, or add their contents to your existing user stylesheet.

[edit] Strategies for Mozilla Firefox

[edit] CSS for userContent.css

Use the instructions on the User Stylesheets page to put this CSS in your userContent.css:

/* Removes LJ Ads from pages. */
/* Code From ambience8 */

@-moz-document domain("livejournal.com") {

div.adv {display: none !important; visibility: hidden !important;}
div.ljad {display: none !important; visibility: hidden !important;}
div.ljadleaderboard-bottom {display: none !important; visibility: hidden !important;}
div.ljadleaderboard {display: none !important; visibility: hidden !important;}
div.ljadwrapper-journal-after-post-c {display: none !important; visibility: hidden !important;}
div.ljadwrapper-app-home {display: none !important; visibility: hidden !important;}
div.ljadmedrect {display: none !important; visibility: hidden !important;}

}

[edit] CSS for the Stylish Extension

There is a one-click installation here.

[edit] Greasemonkey Script

Install this script.

[edit] CSS for Other Browsers

Use the instructions on the User Stylesheets page to put this CSS in your user stylesheet:

/* Removes LJ Ads from pages. */
/* Code From ambience8 */


div.adv {display: none !important; visibility: hidden !important;}
div.ljad {display: none !important; visibility: hidden !important;}
div.ljadleaderboard-bottom {display: none !important; visibility: hidden !important;}
div.ljadleaderboard {display: none !important; visibility: hidden !important;}
div.ljadwrapper-journal-after-post-c {display: none !important; visibility: hidden !important;}
div.ljadwrapper-app-home {display: none !important; visibility: hidden !important;}
div.ljadmedrect {display: none !important; visibility: hidden !important;}

The odds of this CSS affecting domains other than LiveJournal is very low, and on LiveJournal it should only block the ads themselves.

[edit] Testing

You can test the efficiency of this guide by going to our test Plus account [info]plus_tester. If this works, you shouldn't see any ads.

[edit] Troubleshooting

  1. If you are manually creating or editing a user stylesheet, try using our stylesheet files instead of yours.
  2. Make sure your cache has been cleared.
  3. Stylish users, try to use the pre-made file instead of making yours
  4. Firefox users, try to use alternative methods.

[edit] Feedback

Please let us know by commenting here or on this article's Discussion page if:

  1. These directions worked for you.
  2. If these directions did not work for you or don't make sense. I will try and help troubleshoot and then fix the instructions if needed.
  3. If the directions "worked" but something is going wrong.
  4. You're using a browser not included above; I'll try to find some instructions on the web, even if I won't be able to test them.

In all instances, let us know your setup: operating system, browser, browser version, etc.