April 20, 2009

Save a Bookmark on Deliciousで自動的におすすめ/人気タグを入力するGreasemonkeyスクリプト

Download

Delicious Tagger for Greasemonkey

Code

// ==UserScript==
// @name        Delicious Tagger
// @namespace  http://satomacoto.blogspot.com/
// @include     http://delicious.com/save?*
// @description  Adds the populer/recommended tags
// ==/UserScript==

var d = document;

var recos = d.getElementById('save-reco-tags');
var pops = d.getElementById('save-pop-tags');

var tags = '';
if (recos != null) {
  recos = recos.getElementsByClassName('tag-list-tag')
  for (var i = 0; i < recos.length; i++)
    tags += recos[i].innerText + ' ';
}
if (pops != null) {
  pops = pops.getElementsByClassName('tag-list-tag');
  for (var i = 0; i < pops.length; i++)
    tags += pops[i].innerText + ' ';
}

d.getElementById('tags').value = tags;
d.getElementById('tags').focus();

No comments:

Post a Comment