Skip to content

Instantly share code, notes, and snippets.

View hiromitz's full-sized avatar

Hiro Miyanishi hiromitz

View GitHub Profile
@amoilanen
amoilanen / webcrawler.js
Last active March 24, 2022 03:14
Simple PhantomJS-based web crawler library
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler"
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
@addyosmani
addyosmani / visibly.js
Created August 3, 2011 12:44
Cross-browser Page Visibility API polyfill
/*!
* isVis - v0.5.5 Aug 2011 - Page Visibility API Polyfill
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
*/
(function () {
window.visibly = {
b: null,
q: document,