X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f938afb8ab4cb091d12e0ef0311eaea14b774798..1024e7820ecb22cde464da17ae22b161adf75c3b:/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"; +}