Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

Saturday, February 16, 2013

Block Reddit Ads, Part Deux

In my previous post I outlined a method to block Reddit ads. 

It worked, until I tried hitting Reddit early this morning.

It appears that the ad structure is slightly different, now the following element hiding rule in the Element Hiding Helper of AdBlock Plus should do the trick:

reddit.com###siteTable_organic.organic-listing


This ought to work until they decide to change up their site structure once again. 

UPDATE: Apparently, the developer of AdBlock Plus has decreed that Reddit ads will from this point forward be whitelisted, stating that Reddit ads meet their 'acceptable ads' guidelines, necessitating custom rules like I describe above. To me, this is a bad idea, especially since even bigtime advertisers like Yahoo, Fox, and Google have inadvertently helped malware procreate through ads.





Friday, February 15, 2013

Block Reddit Ads

Reddit recently introduced an update to their ads which eludes AdBlock Plus.




Instead of a simple element ID denoted as a sponsored link, their page uniquely identifies it according to a link to the comments for a given ad posting. Ads annoy me, and as my previous post on blocking Reddit ads attests, even their minimal advertising is an unwanted distraction.

However, using the Element Hiding Helper, it's trivial to block the new ad scheme. If you're already familiar with hiding elements, all you need to do is add an element hiding rule like this:
reddit.com###siteTable_promoted > *

If you want a more detailed procedure which might help you block other unwanted web content, read on.

In Firefox, tap the ALT key to display the menu, then click Tools => AdBlock Plus => Select an element to hide (or alternatively hit CTRL-SHIFT-F3). This brings up the element selection dialog that lets you pick and choose items on the web page to hide.



Now a red selection box will outline and identify elements of the page as your mouse cursor hovers over them. If you hover over the sponsored link area, you should see something like this:



Note the entire ad post is surrounded, with a tag in the lower-left indicating the post is within a DIV element. Click on the tag for this area, and you'll open the Compose element hiding rule dialog.



This is the Basic view, but we need to go deeper, so click on the Advanced view button.


By default, when you clicked to select the ad, the element hider chose that specific DIV element. However, blocking this won't do, as each ad will have a unique identifier (in this case, 17aahm) which will foil the filter. 

To get around this, first click on the checkbox beside the option that begins "class: thing id-..." to uncheck it, and then click on the DIV in the list which is the parent to this one, just above the default selection. Then, click the checkbox beside siteTable_promoted so that it's checked, and then click the Add element hiding rule button.





Now the ad should be hidden, either immediately or after your next refresh of Reddit's page.




Wednesday, May 30, 2012

Firefox Performance Problems

Lately I've noticed Firefox seems to be lagging as of the latest release of version 12. 

Since my earlier post regarding setting Firefox up to utilize CPU affinity in Windows, things have been manageable, but lately a familiar flavor of failure seems to have crept back into this latest release.

If I leave Firefox open and running overnight with my usual group of a dozen or so tabs open, as soon as I resume activity in the morning, I notice in Task Manager that Firefox has one of my system's CPU cores at 100% usage, and has well over 1.7 GB of system memory in use, far more than what typically ranges from 400 to 700 MB on an average day.

Any given morning, thanks to Firefox.

More often than not, once I clear this CPU usage spike by ending the firefox.exe process, when I reopen Firefox I'm greeted with tabs notifying me of add-on updates that have been applied. 


This same issue seemed to be absent as of, say, version 10, but appears to have recently reemerged, at least in my experience on several different PCs running Windows 7.

A common thread among established users on the Firefox support forum points to the various add-ons users have installed. Clearly, many of them say, this is the culprit, and the often the user is advised to open Firefox sans add-ons and attempt to reproduce the problem by enabling add-ons one by one and testing after each to determine which might be the culprit.

I have no desire to invest the time and effort in something that I think developers and analysts at Mozilla should be hammering out themselves. It seems that if you release a platform on which users will develop add-ons, there should be safeguards in place to prevent poor coding from disrupting the integrity of the browser's functionality.

That being said, if you have a 64-bit system, consider trying out Waterfox, a Firefox build which emphasizes performance and speed, and mitigates a lot of whatever lurks in Firefox's codebase that might be causing this excessive memory usage and lag.

Perhaps it's some insidious conspiracy to make it so that when your computer is otherwise asleep at night, Firefox will rear its head and ramp up CPU usage and therefore power consumption, making an impact, however small, on world oil prices, driving up costs and compelling people to bite the bullet and get off the grid with their own solar, wind, nuclear, or other alternative power source.

I've had crazier ideas!




Wednesday, January 18, 2012

Blackout, or Blackmail?

Today, Wikipedia joins a host of other sites participating in a protest against SOPA and PIPA, legislation which threatens to cripple the internet as we know it.

In solidarity with this movement, a "blackout" page appears when you try to view a given Wikipedia article.



This is a token gesture at best, meant to prevent the majority of netizens from browsing their content. It's trivial to set up a rule in the Element HIding Helper for AdBlock Plus which prevents this banner from appearing in Firefox.

Here's how to view Wikipedia articles despite the blackout:

1. Tap the Alt key to view the menu in Firefox.

2. Click Tools => AdBlock Plus => Filter Preferences.



3. Add the following element hiding rule:
||wikipedia.org/w/index.php?title=Special:BannerController

As a longtime geek and software developer, it only took minutes for me to find a way around the blackout. It's easy to take for granted the ease of access we all have to vast
stores of information on the web. 

My first reaction to the blackout made me think blackmail

Here we have Wikipedia essentially holding their information hostage, allowing a relatively small minority with the skills and wherewithal to work around the block, while the rest scrabble around looking for other sites with information they need, or... gasp... going outside and walking to the public library to interact with a real, living human being to do their research.

For the duration of Wikipedia's blackout, there may be some who will suffer, albeit on the level of many relatively trivial first-world problems. Students scrambling to finish their research paper due later today will have to make do with various other sites that tell you about alternatives or help you work around the block. Someone looking up the etymology of mango for trivia with friends over lunch will have to look past the first or second search engine result.

Yet, it is sobering to think how much people will suffer should SOPA in its initially proposed form pass. Freedom of information is core to the internet and fundamental to the continually evolving paradigm introduced by the information age. Clearly SOPA threatens that liquidity of information and, in fairly typical form, reveals how ignorant politicians succumb to the swansong of SOPA supporters trying the latest shotgun approach in a weak effort to combat theft of intellectual property.

I'm happy to share information which will enable others to freely view Wikipedia despite the blackout, but in retrospect perhaps Wikipedia realized how easy it would be to work around the block, and get others at a similar place in life as myself to think for a moment about what it might be like for the rich Persian rug of information to be swept out from under our feet with the fall of a gavel in Congress.







Saturday, October 15, 2011

Cannot Modify the Needed File

Upon restarting Windows, my StumbleUpon toolbar in Firefox seemed no more.

I went to the StumbleUpon site and tried to reinstall the add-on, but got this error:

StumbleUpon could not be installed because Firefox cannot modify the needed file.

My setup is a bit unusual in that I have a QSoft RAMDisk drive set up on my 4 GB system to utilize the extra 768 MB or so of PAE memory, normally inaccessible to Windows 7. I configured my system to use a folder on this drive, R:, named TEMP as a scratch space, and set up Firefox to use R:\ for its cache.



I discovered, however, that I'd forgotten to create a little script or batch file to create this TEMP folder on the R: drive. This meant that for some programs that might use the system's default temp space, it might fail, the folder R:\TEMP being nonexistent.

To get around this I simply modified my environment variables for TEMP and TMP to reference the root of the RAM drive, R:\. Now the StumbleUpon toolbar add-on installs successfully.

In case you encounter this error, make sure that you have sufficient space available in whatever folder you tell Windows to use as scratch space, and of course that it exists in the first place and is accessible.





Wednesday, April 13, 2011

Malware Redirects Google Search Results

Encountered what appears to be malware with some javascript which caused Microsoft Security Essentials (MSE) to throw errors and almost, but not quite, infect a system.

Popup notifications appeared in the systray every few seconds, and the MSE process MsMpEng.exe was gobbling up 50%+ CPU trying to keep whatever was trying to infect this Windows XP service pack 3 PC under control.

MSE's log showed the following error at the top of the details:
Microsoft Security Essentials encountered the following error: Error code 0x800703e4. Overlapped I/O event is not in a signaled state.

It listed numerous instances of the following as the most recent triggers for the cleanup:
TrojanDownloader:Java/OpenConnection.J
TrojanDownloader:Java/OpenConnection.JJ

Interestingly, the malware kept triggering the alerts from a specific path on the system:
C:\Documents and Settings\User\Application Data\Sun\Java\Deployment\cache\6.0\14\3cb28b8e-3c71bd02->lort/cooter.class

Apparently lort/cooter.class is related to a family of malware dubbed JAVA/Exdoer, based on a log file I found posted here. The system's default browser (Firefox) was redirecting Google search results to various sites with advertising. While MSE seemed to be detecting and responding to whatever active component of this malware, freshly-updated installs of SpyBot, MalwareBytes, and PrevX did not detect it.

I decided first to try to simply close all browsers, then run a utility called GOOREDFIX.EXE as described in this forum post. It returned the following log info:
GooredFix by jpshortstuff (03.07.10.1)
Log created at 15:54 on 13/04/2011 (Jan)
Firefox version 3.6.16 (en-US)

========== GooredScan ==========

Deleting HKEY_LOCAL_MACHINE\Software\Mozilla\Firefox\Extensions\\{A1E5480F-729F-4237-AD8E-2C46BA793DFE} -> Success!
Deleting C:\Documents and Settings\User\Local Settings\Application Data\{A1E5480F-729F-4237-AD8E-2C46BA793DFE} -> Success!

========== GooredLog ==========

C:\Program Files\Mozilla Firefox\extensions\
{972ce4c6-7e08-4474-a285-3208198ce6fd} [18:53 08/03/2011]
{972ce4c6-7e08-4474-a285-3208198ce6fd}(2) [18:19 08/03/2011]
{CAFEEFAC-0016-0000-0017-ABCDEFFEDCBA} [20:30 16/01/2010]

C:\Documents and Settings\User\Application Data\Mozilla\Firefox\Profiles\c06n7342.User\extensions\
adblockpopups@jessehakanen.net [01:37 14/03/2011]
{20a82645-c095-46ed-80e3-08825760534b} [01:08 27/12/2010]
{7b13ec3e-999a-4b70-b9cb-2617b8323822} [19:18 12/04/2011]
{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} [16:22 27/03/2011]

[HKEY_LOCAL_MACHINE\Software\Mozilla\Firefox\Extensions]
"{20a82645-c095-46ed-80e3-08825760534b}"="C:\WINDOWS\Microsoft.NET\Framework\v3.5\Windows Presentation Foundation\DotNetAssistantExtension\" [20:46 30/09/2009]
"jqs@sun.com"="C:\Program Files\Java\jre6\lib\deploy\jqs\ff" [20:30 16/01/2010]

-=E.O.F=-


However, something seemed to reactivate the malware upon reopening Firefox, and the MSE systray popups began again.

I closed the browser, ensured that neither firefox.exe nor any other suspicious executables were present among the running processes, reran GOOREDFIX.EXE, then simply deleted the following folder:
C:\Documents and Settings\User\Application Data\Sun\Java\Deployment\cache\

Upon reopening Firefox, no further MSE notification popups appeared, and after running a full scan with MSE, no threats in memory nor in the file system were reported. So far, at least, it looks like whatever this malware was has been eliminated, but we shall see!





Wednesday, March 23, 2011

Manage Blocked Sites? Thanks, Google!

Google recently unveiled a tremendous new feature which allows you to block sites from their search results.

A feature previously only available as an extension for Chrome, users with a Google Account can now maintain their own, personal blacklist of sites whose search results aren't useful.

The original entry about this release on the Google blog tells the story, and you can click the following link to actually access your very own Manage Blocked Sites screen (assuming you're signed in to your Google account).

I mainly use Google, Bing, and Ask for my searches, but now Google is in my top spot solely for this feature. Too often I've submitted a query to a search engine only to be bombarded by useless results consisting of anything from advertising to porn to advertising about porn to malware, and habitually I'd just click the third or fourth page of results in the hope that I'd find some worthwhile content. Now I can shape my search results by eliminating much of the fluff, which translates into much more productive searches.

Creators of fluff are on notice:
"Sites will be blocked only for you, but Google may use everyone's blocking information to improve the ranking of search results overall."

Content is king, as the saying goes, and this is one big step in helping us mere users leverage the system by enabling us to trim away the fluff as we find it.

Well played, Google!


Friday, March 4, 2011

Chattr - A New Way to Talk on the Web

Chattrr is a novel new way to chat. 

It's a bookmarklet which utilizes an intelligent chat room allocation algorithm to connect you with other Chattrr users who happen to be browsing the same website.

Picture yourself at an art gallery. Perhaps you're puzzling over why someone would pay $140 million for a Jackson Pollock. Someone else strolls in, and they, too, find a common thread to chat you up about. Others come, looking at the same thing, which might remind one of a high school art project they didn't take seriously, another of a haphazard work of "art" slapped together by a chimpanzee one afternoon. Then a fine arts major strolls in and decrees everyone else to be philistines for disparaging such a fine work of "art".

So it is with Chattr, which enables a whole new level of conversation, in real time, among people with eyes trained on the same content.

By applying the real-time chat of IRC atop otherwise relatively static nature of website commentary, I think Chattrr has carved itself a unique niche in the realm of social networking. Whereas you might post a comment on a blog and wait days, even weeks for a response, finding someone to chat with via Chattrr means instant discussion with whomever else is looking to share their thoughts about the experience, particularly for discussion based forums and sites like Reddit, where at any given moment thousands of people may be commenting on the news of the moment.

While the tool has only recently debuted, it is fully open source, has been tested successfully with Firefox, Chromium, Chrome and Safari, and in my mind is the start of something wonderful.





Thursday, January 27, 2011

Improve Firefox Performance with Processor Affinity

Firefox seems to frequently stutter or lag while doing seemingly trivial tasks like scrolling or even typing following the most recent Firefox 3 update.
 
Enter the concept of processor affinity, which enables you to direct applications to utilize one or more specific CPU cores in your multicore system. I discovered a blog post where the author describes creating a shortcut in Windows Vista or Windows 7 which will execute a given application with a specific processor affinity configuration.


PROCEDURE

  1. Copy and paste to create a copy of your current shortcut to Firefox on the Desktop.
  1. Pick a single CPU core, in decimal, to dedicate to Firefox, according to the chart below. I chose CPU 3 on my quad-core system.
0001 = 1 (CPU 0)
0010 = 2 (CPU 1)
0100 = 4 (CPU 2)
1000 = 8 (CPU 3)

  1. In the Target box, copy and paste one of the following lines (the first for 32-bit Windows, the second for 64-bit), and change x to match the value you chose in the above step (change the paths as necessary if your Firefox lives in a different location).
C:\Windows\System32\cmd.exe /c start "C:\Program Files\Mozilla Firefox\" /affinity x firefox.exe

C:\Windows\System32\cmd.exe /c start "C:\Program Files (x86)\Mozilla Firefox\" /affinity x firefox.exe


  1. Click OK to accept the changes, then close and reopen Firefox using the modified shortcut.

Windows XP also allows for changing the processor affinity setting for a given process via the Processes tab in Task Manager, but this setting is applied only for that instance of the application, so you can't use the above method to have a shortcut which automatically sets the affinity every time. If you try it, you'll get this error message:

Invalid switch - "/affinity"

Fortunately, a freeware utility called RunFirst exists which will perform in a similar manner, except it will by default assign only the first CPU core in the system to have affinity with the application you're running it with. To use it, create a batch file to execute firefox.exe like this:
      RunFirst.EXE "C:\Program Files\Mozilla Firefox\firefox.exe"


Now, Firefox has its very own CPU core to use on my Windows 7 system, which is advantageous in that the other applications running on my system need only contend with one core being potentially monopolized by some CPU-expensive operations which Firefox initiates.

I tend to browse with many (read: dozens) of tabs open simultaneously, as well as a plethora of add-ons installed such as AdBlock Plus, DownThemAll, FireBug, GreaseMonkey, FoxyTunes, Stylish, FiddlerSwitch, and more. Mine is hardly a “vanilla” setup, and given that these various add-ons let alone Firefox itself are developed by a variety of developers with a variety of coding styles, even bugs, it’s entirely likely that I’m a victim of chaos, that an unfortunate confluence of events are conspiring to kick my browsing experience in the teeth. 

At least this way, I'm letting Firefox do it's thing on just a single core, rather than having it bleed over onto the others and potentially making my other running processes unhappy.

So far, Firefox seems to be significantly more responsive than before!



Friday, September 24, 2010

Use AdBlock Plus in Firefox to Block Wibiya Toolbar

I'm increasingly finding Wibiya with their annoying toolbar overlay appearing on sites I visit, complete with a bouncing alert message revealing to me that I can update my status on multiple social networks at once. Wow.



Note the pastel coloring, gee, guess what that reminded me of?

I Need To Jump Into The Nearest Volcano And DIE!

On the bright side, a double down arrow lives on the far right end of the overlay, past some Olympic hurdle-style links to the Wibiya RSS feed (useless), a Share link (useless), YouTube (redundant), Blogger (redundant), and a "Powered by Wibiya" link (I... could... care... LESS). On the dark side, clicking the double down, while it does hide most of the overlay, still leaves an irritating little tab.

A quick search revealed this post which describes using the Firefox add-on Adblock Plus to prevent the Wibiya overlay from appearing. The first suggestion in the post to add just "toolbar.wibiya.com" to my AdBlock Plus configuration didn't hide the overlay for the site I was visiting, but a closer read at an update to the original post based on another visitor's comment revealed that adding the base Wibiya URL, "http://*.wibiya.com/*", effectively blocks the Wibiya overlay, including the tab, from appearing.




I'm among those who finds absolutely useless the links to the various social networking sites which Wibiya's overlay provides. It's not so much that I'm antisocial, but see, I use tabbed browsing, I can just keep whatever site huddled among my tabs and not clutter a specific page I'm trying to read with a toolbar-like overlay.

Even if the bouncy, bubbly cartoon bubble vanishes after my first visit, the rest is quite useless. To me, it's a mystery why anyone thinks this would be a popular, let alone useful way to interface with social networking. I can understand finding a given blog post or other site interesting enough to want to share on Facebook or Twitter, I grant them that, but why not use a much less obtrusive, static button for those respective services?

Anyway, kudos to Firefox and AdBlock Plus yet again for providing an easy, flexible means to disable annoying Wibiya tools which, to me, are as useful as bicycle to a fish.

Monday, March 9, 2009

Top 10 List on 10 Separate Pages?? Uhhh... NO.

I discovered a new old Firefox add-on which is my new favorite. Repagination lets you take many annoyingly spoon-fed articles on the web which are broken up into separate pages and consolidate them as you like.

Increasingly, to get their advertising exposed to as many eyes as possible, content publishers will take anything from a howto article to a top 10 list and break it into individual pages. I think mainly the purpose of this is increase the CPM, which is understandable if someone is publishing content for purposes of earning some money.

Another reason for doing this is to try to regulate how much bandwidth is consumed in viewing the site. One user gobbling up 1 item of a top 10 list at a time uses less bandwidth than a user grabbing all 10 items at once. This is certainly a concern particularly for a forum which might be running with an ISP which charges for monthly bandwidth overage. However, some sites like Something Awful will do stuff like charge users a one-time fee for the privilege of searching their forum. While this is understandable, I find it annoying.

Say you have a favorite thread on a forum which is huge, but unfortunately only shows a set limit of posts per page. This add-on lets you bypass the site's limitation, and lets you consolidate all the posts into a single, huge web document.

In the screenshot below, by right-clicking on the Next link, a Repagination popup menu is present, and the "All" option I choose lets me append to the current page all subsequent pages of the forum thread.


In this example, a thread which is several hundred pages long can, if I like, be loaded en masse in a single browser window. At that point, I can easily search it for references, in this case, to artists or songs I like, or just save the whole mess for viewing later on a laptop if I happen to be somewhere without wireless connectivity (a situation which is becoming increasingly infrequent).

While the popularity of this kind of add-on certainly will open the floodgates as far as your ability to gobble up more of a content publisher's bandwidth at one time, it also will and arguably should send the message that informed users can and will get around attempts to spoon-feed content and advertising to them.

Although this add-on hasn't been updated recently, someone posted an update to this extension here which makes it compatible with Firefox 3.x. I hope that the author will consider an update of his own, I find it an incredibly helpful and useful add-on!