diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac8f968 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so +*.pyc + +# Logs and databases # +###################### +*.log + +# OS generated files # +###################### +.DS_Store* +ehthumbs.db +Icon? +Thumbs.db diff --git a/README.markdown b/README.markdown index 4a70280..26fb13c 100644 --- a/README.markdown +++ b/README.markdown @@ -25,16 +25,16 @@ for further updates. ## License
-           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-                   Version 2, December 2004 
+           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                   Version 2, December 2004
 
 Copyright (C) 2006 Alex Brem 
-Everyone is permitted to copy and distribute verbatim or modified 
-copies of this license document, and changing it is allowed as long 
-as the name is changed. 
+Everyone is permitted to copy and distribute verbatim or modified
+copies of this license document, and changing it is allowed as long
+as the name is changed.
 
-           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
-  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 
+           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
  0. You just DO WHAT THE FUCK YOU WANT TO.
 
diff --git a/test.html b/test.html index e1063ad..e1fda65 100644 --- a/test.html +++ b/test.html @@ -14,7 +14,7 @@ // install the event handler for #debug #output $('input[@type="text"], textarea').keyup(update).mousedown(update).mousemove(update).mouseup(update); - + // assign the field1 paste event $('.replace').click(function(e){ $('#field1').replaceSelection($(this).title()); @@ -22,13 +22,13 @@ }); }); - + /* this function handles #debug #output */ function update(e) { - + // here we fetch our text range object var range = $(this).getSelection(); @@ -43,17 +43,17 @@ ((typeof range['col'] != 'undefined') ? "caret col: " + range.col + "\n" : '') + "selected text:\n" + (($('#ws').get(0).checked) ? range.text.whitespace() : range.text) + "\n\n" ); - + } - + /* this code block is not needed for jQuery fieldSelection this is just to visualize white space in #debug #output */ String.prototype.whitespace = (function() { - - if (!RegExp.escape) { + + if (!RegExp.escape) { RegExp.escape = (function() { // RegExp.escape by Simon Wilson & Mark Wubben var specials = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\' ]; var sRE = new RegExp( '(\\' + specials.join('|\\') + ')', 'g' ); @@ -61,9 +61,9 @@ })(); } - + var ws = { "\r\n": "¶", "\n": "¶", "\r": "¶", "\t": "»", " ": "·" }; - + return ($.browser.msie) ? function() { // ​ to break up our whitespaces doesn't work in IE (it prints a block) // but nevertheless he doesn't need it, because he has "word-wrap:break-word;" @@ -76,7 +76,7 @@ $.each(ws, function(i){ s = s.replace(new RegExp(RegExp.escape(i), 'g'), this + "\u200b") }); return s; } - + })(); function hexdump(txt, hi_f, hi_t) { @@ -111,9 +111,9 @@ return hex; } - + //--> - +