summaryrefslogtreecommitdiffstats
path: root/data/js/script.js
diff options
context:
space:
mode:
authorJoakim Reinert <mail@jreinert.com>2015-04-19 00:40:45 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-05 12:21:27 +0200
commit645ac23ebea2ff1fe6f585a4f8fea27c3928be0e (patch)
tree48a7a74ef530fbb2004fce50115505259cce1177 /data/js/script.js
parentfe68477d8b60bc9303dd2bcd542915ac05e3fac6 (diff)
Refactor tab width input
Diffstat (limited to 'data/js/script.js')
-rw-r--r--data/js/script.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/data/js/script.js b/data/js/script.js
index 242456971..242cf74de 100644
--- a/data/js/script.js
+++ b/data/js/script.js
@@ -1,40 +1,5 @@
(function($) {
$(function() {
- $('a.tabwidth-toggle').on('click', function (event) {
- setTimeout(function () {
- $(event.target).siblings('.dropdown-menu').find('input').trigger('focus');
- }, 0);
- });
-
- var setTabwidth = function (value) {
- value = value || 8;
- $('span.tabwidth-value').html(value);
- $('.tabwidth-form input').val(value);
- $('.highlight pre').css('tab-size', value);
- localStorage.setItem('tabwidth', value);
- };
-
- $(document).ready(function () {
- setTabwidth(localStorage.getItem('tabwidth'));
- });
-
- $('form.tabwidth-form').on('submit', function (event) {
- var value = $(event.target).find('input').val();
- setTabwidth(value);
- $(event.target).parents('.open').removeClass('open');
- event.preventDefault();
- });
-
- $('form.tabwidth-form input').on('change', function (event) {
- var value = $(event.target).val();
- setTabwidth(value);
- event.preventDefault();
- });
-
- $('form.tabwidth-form input').on('click', function (event) {
- event.stopImmediatePropagation();
- });
-
$('[rel="tooltip"]').tooltip({
placement: 'bottom',
container: 'body',