Created
December 23, 2014 14:24
-
-
Save ssig33/596abff0fef1859ef7bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Author Name | |
// @namespace http://your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @author You | |
// @match https://webcatalog-free.circle.ms/Circle/List* | |
// @grant none | |
// ==/UserScript== | |
$(function() { | |
var $node, fetch_and_update, n, url, _i, _len, _ref, _results; | |
fetch_and_update = function($node, url) { | |
return $.get(url).success(function(data) { | |
var $div, original, text; | |
$div = $('<div>'); | |
$div.html(data); | |
text = $div.find("div.l-contents-large.h-cf > div.l-main > div.m-base--main > div > section > div > section:nth-child(3) > div.m-media.m-circletable > div.m-media__body.md-circleinfo > div.item > table > tbody > tr:nth-child(2) > td:nth-child(2)").text(); | |
original = $node.text(); | |
return $node.text("" + original + " : " + text); | |
}); | |
}; | |
_ref = $('td.infotable-circlename a'); | |
_results = []; | |
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | |
n = _ref[_i]; | |
$node = $(n); | |
url = $node.attr('href'); | |
_results.push(fetch_and_update($node, url)); | |
} | |
return _results; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment