From 2196ea2c73b8f63115ab15a069c725170d41f2bf Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 4 Jan 2012 14:31:06 +0100 Subject: [PATCH 1/2] Faster selector --- 4chan_x.user.js | 10 +++++----- script.coffee | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 0406f56bd..a7e807ccf 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3067,7 +3067,7 @@ return $.prepend(form, controls); }, resize: function() { - return imgExpand.style.innerHTML = ".fitheight [md5] + img {max-height:" + d.body.clientHeight + "px;}"; + return imgExpand.style.innerHTML = ".fitheight img[md5] + img {max-height:" + d.body.clientHeight + "px;}"; } }; @@ -3270,14 +3270,14 @@ float: left;\ pointer-events: none;\ }\ - [md5], [md5] + img {\ + img[md5], img[md5] + img {\ pointer-events: all;\ }\ - .fitwidth [md5] + img {\ + .fitwidth img[md5] + img {\ max-width: 100%;\ }\ - .gecko > .fitwidth [md5] + img,\ - .presto > .fitwidth [md5] + img {\ + .gecko > .fitwidth img[md5] + img,\ + .presto > .fitwidth img[md5] + img {\ width: 100%;\ }\ \ diff --git a/script.coffee b/script.coffee index 42609e1f0..1198ee3bc 100644 --- a/script.coffee +++ b/script.coffee @@ -2375,7 +2375,7 @@ imgExpand = $.prepend form, controls resize: -> - imgExpand.style.innerHTML = ".fitheight [md5] + img {max-height:#{d.body.clientHeight}px;}" + imgExpand.style.innerHTML = ".fitheight img[md5] + img {max-height:#{d.body.clientHeight}px;}" Main = init: -> @@ -2616,14 +2616,14 @@ Main = float: left; pointer-events: none; } - [md5], [md5] + img { + img[md5], img[md5] + img { pointer-events: all; } - .fitwidth [md5] + img { + .fitwidth img[md5] + img { max-width: 100%; } - .gecko > .fitwidth [md5] + img, - .presto > .fitwidth [md5] + img { + .gecko > .fitwidth img[md5] + img, + .presto > .fitwidth img[md5] + img { width: 100%; } From b80c700c4a8d36ac9ab3652ed72a1d46b1ab759b Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 4 Jan 2012 14:46:38 +0100 Subject: [PATCH 2/2] Update copyright holders. Close #92 --- 4chan_x.user.js | 1 + Cakefile | 1 + 2 files changed, 2 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index a7e807ccf..d2df80453 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -16,6 +16,7 @@ /* LICENSE * * Copyright (c) 2009-2011 James Campos + * Copyright (c) 2012 Nicolas Stepien * http://mayhemydg.github.com/4chan-x/ * 4chan X 2.24.0 * diff --git a/Cakefile b/Cakefile index ec093746a..2415c87b1 100644 --- a/Cakefile +++ b/Cakefile @@ -23,6 +23,7 @@ HEADER = """ /* LICENSE * * Copyright (c) 2009-2011 James Campos + * Copyright (c) 2012 Nicolas Stepien * http://mayhemydg.github.com/4chan-x/ * 4chan X #{VERSION} *