Для Chrome - Tempermonkey
// ==UserScript==
// @name javascript.ru
// @namespace http://javascript.ru/
// @version 0.3
// @description enter something useful
// @match http://*javascript.ru/*
// @copyright 2012+, You
// ==/UserScript==
var on = 'addEventListener', off = 'removeEventListener',
q = function (s, e) { var q, d = document, e = e || d, a = [], f, i; if (!s) { return d };
if (typeof e == 'function') { f = e; e = d; } q = e.querySelectorAll(s);
for (i=0; i < q.length; i++) { if(f) { q[i] = f(q[i]); if(q[i]) {a.push(q[i])}} else {a.push(q[i])}} return a};
q('table td.alt1 div:first-child img', function (el) {
el.style.maxWidth = '100px';
el.style.maxHeight = '100px';
el.addEventListener('click', function (e) {
if (this.style.maxWidth == '100px') {
this.style.maxHeight = '100%';
this.style.maxWidth = '100%';
this.style.width = '600px';
}
else {
this.style.maxWidth = '100px';
this.style.maxHeight = '100px';
}
}, false);
});
Для Firefox - Gracemonkey
// ==UserScript==
// @name javascript.ru
// @namespace javascript.ru
// @include http://*javascript.ru/*
// @version 0.1
// @grant none
// ==/UserScript==
var on = 'addEventListener', off = 'removeEventListener',
q = function (s, e) { var q, d = document, e = e || d, a = [], f, i; if (!s) { return d };
if (typeof e == 'function') { f = e; e = d; } q = e.querySelectorAll(s);
for (i=0; i < q.length; i++) { if(f) { q[i] = f(q[i]); if(q[i]) {a.push(q[i])}} else {a.push(q[i])}} return a};
q('table td.alt1 div:first-child img', function (el) {
el.style.maxWidth = '100px';
el.style.maxHeight = '100px';
el.addEventListener('click', function (e) {
if (this.style.maxWidth == '100px') {
this.style.maxHeight = '100%';
this.style.maxWidth = '100%';
this.style.width = '600px';
}
else {
this.style.maxWidth = '100px';
this.style.maxHeight = '100px';
}
}, false);
});
https://github.com/seolog/corn.js