Skip to content

Instantly share code, notes, and snippets.

@adw0rd
Created February 29, 2012 03:53
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 adw0rd/1937459 to your computer and use it in GitHub Desktop.
Save adw0rd/1937459 to your computer and use it in GitHub Desktop.
Ftp-Airnet-Kinopoisk helper (greasemonkey)
// ==UserScript==
// @name Ftp-Airnet-Kinopoisk helper
// @namespace http://airnet.lan/
// @version 0.1
// @description airnet helper for kinopoisk
// @include ftp://ftp.airnet.lan/Video/*
// ==/UserScript==
var list = document.getElementsByTagName('table');
var el = list[0].getElementsByTagName('tr');
for(i in el) {
if (i == 0) continue;
// Get film name from ftp-table and buil link to kinopoisk-search
var film_name = el[i].getElementsByTagName('td')[0].getElementsByTagName('a')[0].innerHTML;
var search_link = "http://www.kinopoisk.ru/index.php?first=no&kp_query=" + encodeURI(film_name);
// Write link to kinopoisk
el[i].getElementsByTagName('td')[3].innerHTML = '<a href="' + search_link + '">Kinopoisk</a>';
}
@adw0rd
Copy link
Author

adw0rd commented Feb 29, 2012

Add to greasemonkey scripts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment