From 827f6d6f54de9199f45d1f138d5725cb84131ab8 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 30 Sep 2015 23:35:37 +0900 Subject: Unlets --- lo.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'lo.js') diff --git a/lo.js b/lo.js index 45d4e3f..2232e49 100644 --- a/lo.js +++ b/lo.js @@ -236,7 +236,8 @@ let INFO = xml` const WHERE_COMPLETIONS = ['f', 't', 'n', 'b', 'c', 'w']; - let (foihandle) { + (function () { + let foihandle; commands.addUserCommand( ['fo[pen]', 'filteropen'], @@ -299,9 +300,10 @@ let INFO = xml` true ); - } + })(); - let (lolinks = []) { + (function () { + let lolinks = []; commands.addUserCommand( ['lo[pen]', 'linkopen'], 'Filtered open', @@ -334,7 +336,10 @@ let INFO = xml` context.keys = { text: function ({elem, index}) (index + ': ' + join((elem.textContent || elem.href))), description: function ({elem}) (elem.href), - thumbnail: function ({elem}) let (img = elem.querySelector('img')) (img && img.src) + thumbnail: function ({elem}) { + let img = elem.querySelector('img'); + return img && img.src; + } }; context.compare = CompletionContext.Sort.number; let process = Array.slice(context.process); @@ -350,7 +355,7 @@ let INFO = xml` true ); - } + })(); })(); -- cgit v1.2.3