Archive for the ‘Firefox’ Category

FireGestures: Open in new Tab (Link, Search, Empty) scripts

June 11th, 2009 by Andreas - Posted in Firefox

FireGestures is a very nice add-on for Firefox to navigate very fast through web pages, search for a selected text or other useful commands.

This add-on is downloadable at the mozilla addons page. Two small scripts can improve the standard functionality.

The first script opens a link in a new focused tab or search for the selected text. If nothing is selected and no link was used an empty focused tab will be created.

// (1) Open link in a new Tab - focused
var srcNode = FireGestures.sourceNode;
var linkURL = FireGestures.getLinkURL(srcNode);
if (linkURL) {
  gBrowser.loadOneTab(linkURL, null, null, null, false, false);
  return;
}
 
// (2) Else if you select a text, search for it  - focused
var sel = FireGestures.getSelectedText();
if (sel) {
  var ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
  var submission = ss.currentEngine.getSubmission(sel, null);
  gBrowser.loadOneTab(submission.uri.spec, null, null, submission.postData, false, false);
  return;
}
 
// (3) Else create new tab  - focused
if (!linkURL && !sel)
{
  document.getElementById("cmd_newNavigatorTab").doCommand();
  return;
}

The second script opens a link in a new background tab or search for the selected text.

// (1) Open link in a new Tab - background
var srcNode = FireGestures.sourceNode;
var linkURL = FireGestures.getLinkURL(srcNode);
if (linkURL) {
  gBrowser.loadOneTab(linkURL, null, null, null, true, false);
  return;
}
 
// (2) Else if you select a text, search for it - background
var sel = FireGestures.getSelectedText();
if (sel) {
  var ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
  var submission = ss.currentEngine.getSubmission(sel, null);
  gBrowser.loadOneTab(submission.uri.spec, null, null, submission.postData, true, false);
  return;
}

Other useful scripts can be found at the FireGestures homepage.


Tags: , , , ,
1 Stars2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Firefox Theme: RulerDark url bar color

January 27th, 2009 by Tobias - Posted in Firefox

When using several design themes in firefox (here RulerDark) selection color of selected text in navigation bar is invisible.

To solve this, extend your userChrome.css located at
\profile\chrome\ with following css-code:

#urlbar .textbox-input-box {
   -moz-appearance: none !important;
   background-color: #FFFFFF !important;
}

Tags: , ,
1 Stars2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...