Workers' Edge

Read all 'Javascript' posts in Workers' Edge
October 3, 2008 12:01 AM PDT

'Internet safety' may be an oxymoron

by Dennis O'Reilly
  • 8 comments

To the short list of life's certainties--death and taxes--we can now add "Web threats."

Early indications are that there will be no quick fix for clickjacking, which enables a PC to be infected with malicious software simply by clicking a disguised link on a Web page. All browsers are equally vulnerable, and there appears to be no sure solution, at least in the short term. Even disabling JavaScript and other advanced Web features won't prevent an infection.

Does this mean you should cancel your broadband account and dig out the ham radio? I don't recommend it. In fact, reports such as these show the folly of believing that our Web browsing is ever completely safe. No hardware or software will ever be 100 percent secure.

Yes, keep your antivirus definitions up-to-date. Yes, use a firewall. Download and install Giorgio Maone's NoScript extension for Firefox (donation requested) to gain site-by-site control over the scripts that run in the browser.

But even these precautions are no substitute for common sense. Be careful about the sites you visit and the links you click. View your e-mail as plain text; Microsoft's support site provides instructions for doing so in Outlook 2003 and 2007. In Mozilla Thunderbird, simply click View, Message Body As, Plain Text.

Last, but definitely not least, every PC user must acknowledge that the day will dawn when their system crashes for good--whether due to a malware attack or (more likely) a hardware or software failure. Keep your data backed up. In addition to creating an image backup of your hard drive once or twice a year, using a program such as Acronis' $50 True Image Home (15-day free trial), use an online backup service to keep your important data files fresh.

May 6, 2008 12:01 AM PDT

Roll your own Firefox scripts with Chickenfoot

by Dennis O'Reilly
  • Post a comment

Any task you perform on the Web can be automated by writing a script. But you don't have to know how to use Javascript or some other scripting language to create your own custom scripts. The Chickenfoot add-on for Firefox makes it easy for nonprogrammers to devise scripts that do their bidding.

Chickenfoot was developed by MIT's User Interface Design Group. It's similar to the Greasemonkey scripting extension for Firefox, but its scripts tend to be simpler and easier for nonprogrammers to customize.

After you download the scripting engine, click View > Sidebar > Chickenfoot (or press F8) to open the Chickenfoot Script Editor. Enter the script in the top pane of the sidebar, and click the Run icon to activate the script for the current page. You can also run scripts by copying and pasting them into the editor, or by clicking the sidebar's Open icon and navigating to the .js file. By placing the scripts in the Triggers window, they will run as soon as the target page opens in Firefox.

A silly example of a Chickenfoot script is one that changes the image on the Google home page. First you copy the script from the Chickenfoot site, and then you paste it into the Chickenfoot script editor, swap out the image-source URL for the one of your choosing, and click the Run icon. Gone is the universally recognizable "Google" icon, and in its place is whatever image you chose. Not especially practical perhaps, but a neat little trick nonetheless.

Chickenfoot script replaces the Google icon

Run a Chickenfoot script that changes the "Google" image on the site's home page with the image of your choice.

(Credit: Chickenfoot)

Another Chickenfoot script places an icon at the end of URLs that lead to a PDF download or anywhere other than a Web page. But the real power of Chickenfoot scripts is in customizing those in the various Chickenfoot libraries.

Keep in mind that malicious scripts can wreak havoc on your system, so be judicious in your use of scripts from unfamiliar sources. Likewise, Chickenfoot may be susceptible to cross-site scripting (XSS), so the developers recommend that you create a separate Firefox profile for Chickenfoot, and use the scripts only on sites you trust.

Tomorrow: top online scanners and speed testers.

December 26, 2007 10:12 AM PST

Convert Firefox into a text-only browser

by Dennis O'Reilly
  • 4 comments

Last week I described how to use a simple Javascript to determine the age of a Web page. The only problem: if the page has any dynamic elements that update automatically when the page loads (and these days most Web pages do), the script shows the current time and date.

For pages without auto-update content, type javascript:alert(document.lastModified) into the address bar and press Enter to see a window pop-up with the date and time of the page's last update. I'm still looking for a way to find out how recently specific content on a Web page was updated.

As I was looking for such a method, I stumbled upon a great Firefox add-in from Chris Pedericks called the Web Developer Toolbar (download). As the name implies, the free toolbar is intended to help Web designers test their pages, but it can also be used to show only the text of Web pages, which often makes them easier to read--and to print out.

After you download the toolbar, click Options and check Persist Features. Next, click CSS*Disable Styles*All Styles. Now click Images*Disable Image*All Images. Lastly, click Disable*Disable JavaScript*All JavaScript. You'll see only the page's text, and perhaps a couple of broken-image place markers. Be warned, however, that the results are rarely pretty.

In addition to making the pages easier to print, the text-only versions are also much easier to scan for specific information. (Note that you can retain much of the page's original formatting--minus images--by keeping CSS enabled.)

Tomorrow: Put Microsoft Word's styles to good use.

December 24, 2007 12:01 AM PST

Boost your productivity in Firefox, IE

by Dennis O'Reilly
  • 6 comments

I can live without Microsoft Word, and I'm confident I could manage well enough if you removed Excel from my PC. Even my favorite e-mail app is a nonessential.

But take away my browser, and I might as well not even start up my PC.

Mozilla Firefox is the first program I open and the last one I close each workday (or worknight, as the case may be). I found some great time-savers for the program. And since many of you prefer Internet Explorer, I've got some productivity-enhancing keyboard shortcuts for both browsers.

Reset Firefox's Javascript options
Many of the Web's best features are powered by Javascript, but like every technology, it can be a real troublemaker in the wrong hands. Firefox gives you some control over how much power Javascripts have when you activate them. Click Tools*Options*Content, and choose the Advanced button next to Enable JavaScript. If you're using Firefox 1.5, the options checked by default are "Move or resize existing windows," "Raise or lower windows," and "Disable or replace context menus." The first allows Javascripts to change the size or position of the current window. The second lets a script place a window above or below the current window. The third makes it possible for a script to disable or change your right-click (context) menus.

In Firefox 2.0, only the first and third of these options is checked by default. The last two options in this dialog box let Javascripts hide the status bar at the bottom of the browser window, or change its text to allow scrolling-text messages. I leave options 1 and 3 checked, but you may want to give Javascripts more or less control.

Mozilla Firefox's Advanced JavaScript Settings dialog box

Change how much control Javascripts have in the Firefox browser.

Get more control Over Javascripts
You can disable other Javascript window features by using Firefox's about:config settings. To access them, type about:config in the address field and press Enter. To ensure that all pop-up windows are resizable, scroll to dom.disable_window_open_feature.resizable and double-click it to set it to "true." To allow all pop-ups to be minimized, double-click dom.disable_window_open_feature.minimizable. Do the same to dom.disable_window_open_feature.menubar to keep menus visible in pop-ups. To keep the navigation toolbar showing, double-click dom.disable_window_open_feature.location. And to retain scrollbars on pop-ups, double-click dom.disable_window_open_feature.scrollbars to reset this option to true.

Mozilla Firefox's about:config options

Get more control over Javascripts in Firefox by changing these options in about:config.

Time-saving keyboard shortcuts for Internet Explorer, Firefox
Bookmark the current page by pressing Ctrl-D and then Enter.
Open your bookmarks in Firefox by pressing Ctrl-B; open IE's Favorites by pressing Ctrl-I.
Open a new tab by pressing Ctrl-T. Move to the next tab by pressing Ctrl-Tab. If you have lots of tabs open, move between them quickly by pressing Ctrl and the numbers 1 through 9, based on their order in the toolbar.
To close a tab, press Ctrl-W. To close a window, press Ctrl-Shift-W.
Increase the size of the page's font by pressing Ctrl-+; decrease it by pressing Ctrl-- (the hyphen or minus sign).
View the page without the browser border by pressing F11. Press it again to revert to the standard browser view.
Press F5 (or Ctrl-R) to reload the current page, and Ctrl-F5 (or Ctrl-Shift-R) to reload it ignoring the cache.
Press the Backspace key to reload the previous page, or Shift-Backspace to go forward one page.
Press Alt-D to highlight the text in the address box.
Finally, press Ctrl-K in Firefox, or Ctrl-E in IE, to move the cursor to the search box.

Wednesday: A free Firefox add-on that lets you browse text-only, minus images, Javascript, and CSS.

  • prev
  • 1
  • next
advertisement

15 sites that went kaput in 2009

Web sites launch all the time, but they also shut their doors. We highlight 15 that bit the dust this year.

Top 10 news stories of the decade

Let the debate begin: Was the iPhone more important than iTunes? Was anything bigger than Google finding a great business model? CNET offers its list of the 10 most important stories of the '00s.

About Workers' Edge

Dennis O'Reilly has covered PCs and other technologies in print and online since 1985. Along with more than a decade as editor for Ziff-Davis's Computer Select, Dennis edited PC World's award-winning Here's How section for more than seven years. He is a member of the CNET Blog Network and is not an employee of CNET.

Add this feed to your online news reader

Workers' Edge topics

Most Discussed



advertisement

Inside CNET News

Scroll Left Scroll Right