summaryrefslogtreecommitdiff
path: root/public/assets/js/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/vendor')
-rw-r--r--public/assets/js/vendor/util.js41
1 files changed, 21 insertions, 20 deletions
diff --git a/public/assets/js/vendor/util.js b/public/assets/js/vendor/util.js
index 43ca81b..7244d5a 100644
--- a/public/assets/js/vendor/util.js
+++ b/public/assets/js/vendor/util.js
@@ -140,26 +140,6 @@ function range(m,n,s){
return a
}
-// manipulate text selection in an element
-function setSelectionRange(input, selectionStart, selectionEnd) {
- if (input.setSelectionRange) {
- input.focus();
- input.setSelectionRange(selectionStart, selectionEnd);
- }
- else if (input.createTextRange) {
- var range = input.createTextRange();
- range.collapse(true);
- range.moveEnd('character', selectionEnd);
- range.moveStart('character', selectionStart);
- range.select();
- }
-}
-
-// place cursor at a specific point (usually the beginning)
-function setCaretToPos (input, pos) {
- setSelectionRange(input, pos, pos);
-}
-
var guid_syllables = "iz az ez or iv ex baz el lo lum ot un no".split(" ")
var guid_n = 0
function guid(n){
@@ -314,3 +294,24 @@ function selectElementContents(el) {
textRange.select();
}
}
+
+// manipulate text selection in an element
+function setSelectionRange(input, selectionStart, selectionEnd) {
+ if (input.setSelectionRange) {
+ input.focus();
+ input.setSelectionRange(selectionStart, selectionEnd);
+ }
+ else if (input.createTextRange) {
+ var range = input.createTextRange();
+ range.collapse(true);
+ range.moveEnd('character', selectionEnd);
+ range.moveStart('character', selectionStart);
+ range.select();
+ }
+}
+
+// place cursor at a specific point (usually the beginning)
+function setCaretToPos (input, pos) {
+ setSelectionRange(input, pos, pos);
+}
+