首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

查验url

2012-10-08 
检验urlscript// Called when the url of a tab changes.function checkForValidUrl(tabId, changeInfo,

检验url

 <script>      // Called when the url of a tab changes.      function checkForValidUrl(tabId, changeInfo, tab) {        // If the letter 'g' is found in the tab's URL...        chrome.tabs.getSelected(null, function(tab) {         // Toggle the pinned statusif(tab.url.indexOf("renren.com")>-1&&!tab.pinned){        //chrome.tabs.update(tab.id, {'pinned': !tab.pinned});}      });      };      // Listen for any changes to the URL of any tab.      chrome.tabs.onUpdated.addListener(checkForValidUrl);    </script>

人人空曾经用过,检验url

热点排行