Posts Tagged ‘type’

Customize the Google country-specific search in Firefox

Perhaps you have noticed that by default redirects you to a country-specific version of google based on your IP. This is extremely noticeable when you are travelling or using a proxy. We will see two solutions to the problem.

The first solution is to type in your address bar. This sets a cookie in your browser, which on the other hand tells google not to redirect you. This solution however is not the best, since you completely disable the country-specific search and if you delete your browser cookies you will have to repeat the procedure.

Note: This solution is not Firefox-specific and can be implemented with every browser.

The second solution is a bit more elegant, as it allows you to use multiple country-specific versions of google search, it is not cookie based and it doesn’t change the default behavior of

The second solution utilizes the Firefox search bar:

By default all searches made from the search bar use, however it can be extended to support multiple country-specific google flavors. Let’s show how we can modify it to use as well.

Of course you may ask “What is the point of that? I can always type in my browser”. True, but by extending the search bar, you can finally have a uniform way for doing searches, which makes searches a lot easier.

But let’s see how we can extend the Firefox search bar. Navigate to the searchplugins subdirectory of the Firefox directory (usually C:\Program Files\Mozilla Firefox\searchplugins). You can see several xml files there:

Copy the google.xml file to Move to the Firefox profile folder\searchplugins (C:\Users\<your username>\AppData\Roaming\Mozilla\Firefox\Profiles\<your Firefox profile name>\searchplugins on Windows 7)

Now change in such way.



You can see that we have changed the ShortName, the template argument of the second URL tag and the SearchForm.

Restart Firefox and now you can see Google.DE in your search options:

VN:F [1.9.18_1163]
Rating: 1.0/10 (1 vote cast)

Introduction to JavaScript Pop Up Boxes

Boxes of joy
As annoying as they may be, JavaScript popup boxes are a good way to alert users to some relevant information, confirm a user’s decision, or collect some text input from a user. JavaScript offers three popup boxes to help us accomplish this. They are the alert box, the confirm box, and the prompt box which prompts the user to input some text. Let’s take a closer look at what these boxes can do for us.

The alert box
If you want to be absolutely sure that some information gets through to a user, you may want to try using an alert box. This is a simple (slightly annoying) but effective way of getting your message across. The syntax for an alert box is alert(“……..”); and is very easy to implement in your code. Have a look at the following code:

<html><head><title> Alert Boxes </title><script type="text/javascript">function showAlertBox(){alert(" Yay! My first alert box ") };</script></head><body><input type="button" onclick="showAlertBox();" value="Show Alert box" /></body></html>

As you can see above, we’ve created a function called ShowAlertBox(). All this function will do is make an alert box popup with the text that we specify in our alert() method. With an alert box, the user will have to click ok to proceed. Save the above code to your desktop as alertboxes.html, load it up into your browser, and click the button. You should see an alert box appear in the center of the screen. Fun, right? Let’s move on to our next oh so amazing box, the confirm box.

The Confirm Box
Similar to the alert box, the confirm box will pop up in the center of the screen once it is called. The main difference is that, unlike the alert box, the confirm box allows a user to select yes or no, and will return a value of true or false based on which option they’ve selected. Combining this with the alert box and an if statement, our next code example will popup a confirm box for the user,and then alert them to which option they’ve chosen. Here’s what the code looks like:

<html><head><title>Confirm Boxes </title><script type="text/javascript">function showConfirmBox(){var c = confirm("Would you like to continue"); if (confirm == true) { alert ("You clicked Ok"); } else { alert("Ahhh, you clicked Cancel"); }};</script></head><body><input type="button" onclick="showConfirmBox()" value="Show Confirm box" /></body></html>
As you can see, this is very similar to the alert() function, except, once again, it gives the user an option to select either OK or Cancel.

The Prompt Box

The prompt box creates a popup box that a user may enter text into. If we set the value of the prompt box to a variable, we can take the text that the user provides and use that to manipulate our program. In this example, we’ll prompt the user to enter their name. Once that’s done, we’ll take the name and write it back out to the screen with a warm and fuzzy greeting using document.write(). Let’s take a look at the code to see how it works:

<html><head><title>Prompt Boxes </title><script type="text/javascript">function getName(){ var name = prompt("What is your name"); var theDiv = document.getElementById(”greeting”); theDiv.innerHTML = "Hello, " + name + " How are you today?";};</script></head><body><div id="greeting"> </div><input type="button" onclick="getName()" value="Enter your name" /></body></html>

Running this script and pressing the “enter your name” button will result in an oh-so-awesome prompt box being presented to you, and if you enter your name, you’ll be cordially greeted by the browser. Two quick things to point out. One is that I’ve used the getElementById() method on the document. This tells JavaScript to scan the entire current document and find any element with the ID that I’ve specified. Get used to this one, you’ll use it a lot. In our case, the method returns the div element with the ID of greeting. Once JavaScript finds the right div, it takes the name from our prompt box and injects it, along with some other friendly text, into the div via the innerHTML attribute.

Final thoughts

We’ve now seen how we can alert a visitor to something important in our program, how to confirm that they’d like to perform an action, and how to accept a text input from them. These tools will come in plenty handy in the future, and are just plain fun to mess around with anyway. Now, I think it’s a good time to learn about unobtrusive javascript. This notion basically states to you should never use JavaScript to be a jerk. Repeated pop ups and alerts will only shy your users away, so be sure to implement these techniques only when needed. Join me in my next tutorial for a more thorough look at JavaScript functions, what they accomplish, and how to write your own. See you then! Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.1/10 (11 votes cast)

Create shortcuts for disabling/enabling the Windows 7 firewall

When dealing with network problems, the first thing to do is to disable the Windows 7 firewall. But navigating to the Windows Firewall Settings is quite annoying. So why not make a good pair of shortcuts for enabling/disabling your Windows 7 firewall?

First, right-click on your desktop and select New > Shortcut:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.6/10 (11 votes cast)

How to forbid all access to the Control Panel in Windows 7

Control Panel provides the tools to “make or break” a system. But, if feel worried that someone else using your PC is more likely to break something if he has access to the Control Panel then why don’t you forbid all access to it?

First, click the Start button and type in gpedit.msc in the Start menu search box and press Enter:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)

How to create shortcuts for different power plans in Windows 7

In this tutorial we will introduce a really neat way to switch between power plans. We will create shortcuts for the different power plans. This really speeds up switching between power plans. This trick can be enhanced with keyboard shortcuts to allow users to switch between power plans really, really fast.

First we will open the command prompt. Type in “cmd” in the search box of the start menu:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)

How to verify the integrity of Windows 7 and Windows Vista system files

One way to check your Windows for missing or corrupt system files is by booting the Windows CD/DVD into repair mode. But there must be an easier way, right? Well there is. Using one simple command you can run a utility that will do all that checking all by itself without the need for your Windows DVD.
First, we will open the Command Prompt in administrator mode. To do that locate the Command Prompt in the start menu (All Programs > Accessories > Command Prompt), right click on it and select Run as administrator:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 1.0/10 (1 vote cast)

How to make Firefox 3 use less memory by decreasing the memory cache capacity

For long years Firefox has been my favorite browser. Fast, reliable, user-friendly. But Firefox 3 was kind of a disappointment. It uses way too much memory, it’s slow and this really gets on my nerves. Nonetheless, it is the best browser in terms of usability, security and tabbed browsing experience. So I decided to try and tweak it a bit. One of the tweaks I managed to come up with was to decrease the memory cache capacity. This means that the cache stored in the memory of Firefox (and therefore in the RAM) will be decreased as well.

Open Firefox and open a blank tab. Enter about:config in the Address Bar and press Enter:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (10 votes cast)

Create a shortcut for a second instance of Skype

In this short tutorial we will show you how to create a shortcut for a second Skype instance.

It is rather similar to How to open a second instance of Skype, but here I will show you how to do that easier.

It should be noted that with that shortcut you will be able to open as many Skype instances as you would like.

First open the folder you would like to store your shortcut in. In our example we will make a shortcut on the Desktop.

Right-click anywhere on your desktop. A new menu will appear: Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 2.0/10 (13 votes cast)

Make a folder invisible in Windows 7

This tutorial will show you how to make a folder invisible (not hidden) in Windows 7.

In this quick tutorial we will show you a way to make a folder invisible. It should be noted that we don’t mean hidden. Using this technique you folder won’t be visible even if you have the “Show hidden files and folders” option On.

Let’s say your folder is C:\\xyz. Type in “cmd” in the search box of the start menu:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (10 votes cast)

How to create Shutdown, Restart, Lockdown, Sleep and Hibernate shortcuts in Windows 7

I must say the new Windows 7 shutdown menu is kind of annoying. If you also think so, then you will find this tutorial to be quite useful. For those who wish to assign hotkeys for Shutdown, Restart, Lockdown, Sleep or Hibernate this will be quite useful as well.
First right-click on the desktop, select New and select Shortcut:
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.9/10 (10 votes cast)