Skip to content

Commit

Permalink
Firefox46でリスト内包表記が使えないようなので、map関数で置き換える
Browse files Browse the repository at this point in the history
  • Loading branch information
kai2nenobu committed Apr 27, 2016
1 parent 763c88d commit 07f701a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .keysnail/.keysnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,9 @@ ext.add("list-closed-tabs", function () {
const fav = "chrome://mozapps/skin/places/defaultFavicon.png";
var ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
var json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
var closedTabs = [[tab.image || fav, tab.title] for each (tab in json.decode(ss.getClosedTabData(window)))];
var closedTabs = json.decode(ss.getClosedTabData(window)).map(function (tab) {
return [tab.image || fav, tab.title];
});

if (!closedTabs.length)
return void display.echoStatusBar("最近閉じたタブが見つかりませんでした", 2000);
Expand Down

0 comments on commit 07f701a

Please sign in to comment.