Tag Archives: browser

jQuery: Change Doctype

There are a few things you might want to know if you’re looking to change the document type (doctype) using jQuery or Javascript. First, doctype is listed as a property in the W3C documentation, and is defined as read-only: interface Document : Node { readonly attribute DocumentType doctype; readonly attribute DOMImplementation implementation; readonly attribute Element documentElement; Element createElement(in DOMString tagName) raises(DOMException); DocumentFragment createDocumentFragment(); While it may be possible to insert a doctype with javascript / jquery above the HTML tag, it is not advisable to do so. Sample code which would do this might look like: <!– no doctype, loads in Quirks Mode (BackCompat) –> <html> <!– rest of the document, then at the end: –> <script> alert(‘now in compatMode ‘+document.compatMode); if (document.compatMode===’BackCompat’) { setTimeout(function() { var markup= document.documentElement.innerHTML; markup= ‘< !DOCTYPE html><html xmlns=”http://www.w3.org/1999/xhtml” lang=”en” xml:lang=”en”>’+markup+'</html>’; document.open(); document.write(markup); document.close(); }, 0); } </script> </html> via

Posted in Tech Tips, Web Development | Tagged , , , , , , | Leave a comment

Google Search Lucky

Google’s “I’m Feeling Lucky” search in Google Chrome Do you want to use Google’s “I’m Feeling Lucky” search in Google Chrome? It’s easy using the custom search engines. In Google Chrome click the wrench icon and then choose prferences next click manage custom search engines Inser the string(s) below and a name (pretty much irrelevant) and they shortcut keyword you want to use. I use > Google Search Lucky Strings Standard “Im Feeling Lucky” Search http://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky SSL Encrypted “Im Feeling Lucky” Search https://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky Note: I’ve stripped out all items such as encoding and referrer to keep this as clean and simple as it can be. Now you can simply type in something like > Google Docs into your browser bar and have it go to the first result – which is most likely the right place.

Posted in Mac, Software, Tech Tips, Web Development | Tagged , , , , , , , , , , | 2 Comments

Elinks User Agent Override

To manually set the useragent for the e-links web browser, edit this file: ~/.elinks/elinks.conf The syntax for setting or overriding the user agent is something like this: set protocol.http.user_agent = “Firefox/2.0.0.4” Or possibly this for a more realistic agent string: set protocol.http.user_agent = “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060426 Firefox/1.5.0.4”

Posted in Web Development | Tagged , , , , , , , | Leave a comment

Google Chrome: Disable Automatic Updates

Are you tried of Google Chrome automatically installing updates? You can disable it on both Windows and Mac machines: Windows Machines Open registry editor. Locate: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update Add a new DWORD value named DisableAutoUpdateChecksCheckboxValue and set it to 1 to disable automatic updates or 0 to re-enable them. Mac OS X Open terminal and run the following command: defaults write com.google.Keystone.Agent checkInterval 0 To re-enable automatic updates for google chrome use this command: defaults write com.google.Keystone.Agent checkInterval 18000 This also works for Chromium and beta versions of GoogleChrome.

Posted in Mac, Tech Tips, Web Development | Tagged , , , , | Leave a comment

Firefox 4 Artwork

I have to say that the artwork for FF4 is pretty sweet: And a larger version:

Posted in Tech Tips, Web Development | Tagged , , | 4 Comments

Bigger Gmail Compose Box

A Gmail Compose Resize Extension for Google Chrome Details: Have you ever wanted a larger compose box for gMail? especially when using g-mail to reply to a conversation? I give them credit, most times when composing a new message or using it in full-screen mode, it does well. But if you’re like me, about 80% of your conversations are replies. And that is, after all, what is great about g-mail, right? The awesome threading capabilities. So why doesn’t g-mail support a resizeable compose box? You are stuck with a fixed size, of about 260 px, even in the Chrome browser!!! A browser that is know to let you resize text boxes by default! Well, I don’t know the answers to these questions, but they are frustrating, so I’ve written an extension for Chrome (or Chromium) which allows you to specify how big you want that box to be, and then it automatically resizes it (it make take a few seconds after you hit reply to fully grow). Update: As of 2/7/2012 I’ve written a newer, and more updated extension download it here Download the extension here: Bigger Gmail Compose Box It has an options page, which you can access by going to settings (wrench icon) and then extensions. I have also added in auto-update for this extension. I’m really quite pleased with it and wanted to share. Let me know what you think. Having trouble? Didn’t know that Chrome allows extensions? You probably need to upgrade to the latest version. … Continue reading

Posted in Software, Tech Tips, Web Development | Tagged , , , , , , , , | 24 Comments