Skip to content

Instantly share code, notes, and snippets.

@ino46
Created January 20, 2009 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ino46/49545 to your computer and use it in GitHub Desktop.
Save ino46/49545 to your computer and use it in GitHub Desktop.
タイトルにアドオンの説明を。
// ==UserScript==
// @name Firefox Info Wiki Custom Title
// @namespace http://inoshiro.blogspot.com/
// @description タイトルにアドオンの説明を。
// @include http://wikiwiki.jp/firefox/?cmd=read&page=Ext*
// @include http://wikiwiki.jp/firefox/?Ext*
// @require http://gist.github.com/3242.txt
// ==/UserScript==
//
// auther ino46
// website http://d.hatena.ne.jp/ino46/
// version 0.0.3.0 (2009-01-21T01:26:12+09:00)
// defaulticon
// copyright
//
// wrapper function
// simple dollar X http://d.hatena.ne.jp/os0x/20080730/1217395310
//
// ToDo
// XPath の改善
//
var addon_description = $X('id("body")/div[contains(concat(" ",normalize-space(@class)," "), " ie5 ")]/table[contains(concat(" ",normalize-space(@class)," "), " style_table ")]//tr[4]/td[contains(concat(" ",normalize-space(@class)," "), " style_td ")]/span');
addon_description = addon_description[0].textContent;
var new_title = document.title;
new_title = new_title.replace(/(Firefox更新情報 Wiki\*$)/,"");
new_title = new_title + addon_description;
document.title = new_title;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment