god damn it. revert the new tag(). 1.0.10

opera/chrome don't like it.
This commit is contained in:
James Campos 2010-05-08 09:41:48 -07:00
parent 9c3d134e5e
commit 0e907014f4
5 changed files with 16 additions and 7 deletions

View File

@ -35,7 +35,8 @@ inBefore: (root, el) ->
root.parentNode.insertBefore(el, root)
inAfter: (root, el) ->
root.parentNode.insertBefore(el, root.nextSibling)
tag: document.createElement
tag: (el) ->
document.createElement(el)
hide: (el) ->
el.style.display = 'none'
show: (el) ->

View File

@ -47,7 +47,9 @@
inAfter = function inAfter(root, el) {
return root.parentNode.insertBefore(el, root.nextSibling);
};
tag = document.createElement;
tag = function tag(el) {
return document.createElement(el);
};
hide = function hide(el) {
el.style.display = 'none';
return el.style.display;

View File

@ -2,7 +2,7 @@
// @name 4chan x
// @namespace aeosynth
// @description Adds various features; replaces the extension / fychan.
// @version 1.0.9
// @version 1.0.10
// @copyright 2009, 2010 James Campos
// @license MIT; http://en.wikipedia.org/wiki/Mit_license
// @include http://boards.4chan.org/*

View File

@ -13,8 +13,10 @@ $$: (selector, root) ->
node for node in result
inBefore: (root, el) ->
root.parentNode.insertBefore(el, root)
tag: document.createElement
text: document.createTextNode
tag: (el) ->
document.createElement(el)
text: (s) ->
document.createTextNode(s)
remove: (root) ->
root.parentNode.removeChild(root)
position: (el) ->

View File

@ -24,8 +24,12 @@
inBefore = function inBefore(root, el) {
return root.parentNode.insertBefore(el, root);
};
tag = document.createElement;
text = document.createTextNode;
tag = function tag(el) {
return document.createElement(el);
};
text = function text(s) {
return document.createTextNode(s);
};
remove = function remove(root) {
return root.parentNode.removeChild(root);
};