Skip to content

Commit

Permalink
現在開いているタブ以外を閉じるとフォーカスがズレるので何もしない
Browse files Browse the repository at this point in the history
  • Loading branch information
oflow committed Jul 8, 2015
1 parent cd9377e commit 1409eeb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion focus-last-tab.uc.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Focus Last or Unread Tab
// @description タブを閉じたときに直前に開いてたタブか未読タブにフォーカスしたり
// @version 1.4.7
// @version 1.4.8
// @include main
// @compatibility Firefox ESR31.3, 34.0.5
// @author oflow
Expand Down Expand Up @@ -157,6 +157,10 @@
container = [],
hasUnread = false;

if (tab.getAttribute('selected') !== 'true') {
// 現在開いているタブじゃない場合は何もしない
return;
}
for (var i = 0; i < tabsLen; i++) {
var timestamp = ss.getTabValue(tabs[i], 'data-flt-timestamp'),
unread = ss.getTabValue(tabs[i], 'data-flt-unread');
Expand Down

0 comments on commit 1409eeb

Please sign in to comment.