Welcome Guest, Not a member yet? Register   Sign In
My Ubiquity script for searching the CI user guide
#11

[eluser]xwero[/eluser]
The XID are not useful as they expire.

But another cool thing of Ubiquity is that it can replace greasemonkey scripts. Following script is a quick and dirty Ubiquity port of my quicklinks greasemonkey script.
Code:
function append_links(doc,element,urls,links)
{
    for(i in links)
      {
        jQuery(element,doc).append('<a href="'+urls[i]+'">'+links[i]+'</a>&nbsp;&nbsp;&nbsp;');
      }
}

function pageLoad_ciLinks()
{
  var cur_window = CmdUtils.getWindow( );
  var url = cur_[removed].href;

  if(/http:\/\/codeigniter.com/.test(url))
  {
    var base_url = 'http://codeigniter.com/';
    var doc = CmdUtils.getDocument( );
    
    if(/(.+?)forums/.test(url))
    {
      var urls = new Array(base_url+'user_guide',base_url+'wiki');
      var links = new Array('User guide','Wiki');
      
      append_links(doc,'h1',urls,links);
    }
    else if(/(.+?)wiki/.test(url))
    {
      var urls = new Array(base_url+'user_guide',base_url+'forums');
      var links = new Array('User guide','Forum');
      
      append_links(doc,'h1',urls,links);
    }
    else if(/(.+?)user_guide/.test(url))
    {
      var urls = new Array(base_url+'forums',base_url+'wiki');
      var links = new Array('&nbsp;&nbsp;&nbsp;Forum','Wiki');
      
      append_links(doc,'h1',urls,links);
    }
    
  }
}
#12

[eluser]GSV Sleeper Service[/eluser]
watch out for ubiquity, it adds its own string to the end of your user-agent. locked me out of me.com
#13

[eluser]xwero[/eluser]
You can always remove the string in the about:config general.useragent.extra.ubiquity setting




Theme © iAndrew 2016 - Forum software by © MyBB