diff options
author | Joakim Reinert <mail@jreinert.com> | 2015-04-18 23:55:22 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-05-05 12:21:26 +0200 |
commit | fe68477d8b60bc9303dd2bcd542915ac05e3fac6 (patch) | |
tree | 341ca9d71423c21033cbe5d333603bd3f2e0c3ca /data/js/script.js | |
parent | 9f1fb6e1c8fbe2c54b5d9a7f0755557acd7ea84a (diff) |
Refactor lexer input setup
Diffstat (limited to 'data/js/script.js')
-rw-r--r-- | data/js/script.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/data/js/script.js b/data/js/script.js index 91df1b786..242456971 100644 --- a/data/js/script.js +++ b/data/js/script.js @@ -1,22 +1,5 @@ -function fixedEncodeURIComponent (str) { - return encodeURIComponent(str).replace(/[!'()]/g, escape).replace(/\*/g, "%2A"); -} - (function($) { $(function() { - var lexer_source = []; - for (var key in window.lexers) { - lexer_source.push({ label: window.lexers[key], value: key }); - } - - $('[id^=language-]').autocomplete({ - source: lexer_source, - select: function(event, ui) { - event.preventDefault(); - window.location = $(event.target).data("base-url") + '/' + fixedEncodeURIComponent(ui.item.value); - } - }); - $('a.tabwidth-toggle').on('click', function (event) { setTimeout(function () { $(event.target).siblings('.dropdown-menu').find('input').trigger('focus'); @@ -52,19 +35,6 @@ function fixedEncodeURIComponent (str) { event.stopImmediatePropagation(); }); - $(document).on("keyup", "[id^=language-]", function(event) { - if (event.keyCode == 13) { - event.preventDefault(); - window.location = $(event.target).data("base-url") + '/' + fixedEncodeURIComponent($(this).val()); - } - }); - - $('[id^=language-toggle-]').click(function(event) { - setTimeout(function() { - $(event.target).parent().find('[id^=language-]').focus(); - }, 0); - }); - $('[rel="tooltip"]').tooltip({ placement: 'bottom', container: 'body', |