X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9b25359a45e5498ac09b51b96919d515c1cd5d15..28cd732838488b94daa3ff66dbb8a22a11de459e:/redakcja/static/js/lib/codemirror/util.js diff --git a/redakcja/static/js/lib/codemirror/util.js b/redakcja/static/js/lib/codemirror/util.js index 796025ee..c7021c24 100644 --- a/redakcja/static/js/lib/codemirror/util.js +++ b/redakcja/static/js/lib/codemirror/util.js @@ -1,9 +1,5 @@ /* A few useful utility functions. */ -var internetExplorer = document.selection && window.ActiveXObject && /MSIE/.test(navigator.userAgent); -var webkit = /AppleWebKit/.test(navigator.userAgent); -var safari = /Apple Computers, Inc/.test(navigator.vendor); - // Capture a method on an object. function method(obj, name) { return function() {obj[name].apply(obj, arguments);}; @@ -123,3 +119,12 @@ function nodeTop(node) { } return top; } + +function isBR(node) { + var nn = node.nodeName; + return nn == "BR" || nn == "br"; +} +function isSpan(node) { + var nn = node.nodeName; + return nn == "SPAN" || nn == "span"; +}