diff --git a/js/bookmark.js b/js/bookmark.js index 4f25d14..c5bcc56 100644 --- a/js/bookmark.js +++ b/js/bookmark.js @@ -99,8 +99,18 @@ var Bookmark = { } } }, + //通过tab_id找index + find_index_by_tab_id: function(tab_id){ + for(var i in Bookmark.list){ + if(Bookmark.list[i]==tab_id){ + return i; + } + } + return false; + }, //设置一个书签跳过 set_jump: function(tab_id, val){ + if(!Bookmark.find_index_by_tab_id(tab_id))return; if(val==undefined)val=1; if(val==1){ Bookmark.jump[tab_id] = val; diff --git a/manifest.json b/manifest.json index de220fb..dd6c43c 100644 --- a/manifest.json +++ b/manifest.json @@ -8,7 +8,7 @@ "name": "__MSG_appname__", "description": "__MSG_appdesc__", - "version": "2.2.0", + "version": "2.2.1", "icons": { "16": "img/icon-16.png",