PageSourceSearch

https://grace-xhw.github.io/projects/imooc/js/setHomeSetFav.js

js grace-xhw.github.io collected 2026-10-03 09:15:21 UTC 834 bytes, 53 lines download raw bytes

1//¼ÓÈëÊÕ²Ø
2
3function AddFavorite(sURL, sTitle)
4{
5    
6    sURL = encodeURI(sURL);
7    try
8    {
9        
10        window.external.addFavorite(sURL, sTitle);
11        
12    }
13    catch (e)
14    {
15        
16        try
17        {
18            
19            window.sidebar.addPanel(sTitle, sURL, "");
20            
21        }
22        catch (e)
23        {
24            
25            alert("¼ÓÈëÊÕ²ØÊ§°Ü£¬ÇëʹÓÃCtrl+D½øÐÐÌí¼Ó,»òÊÖ¶¯ÔÚä¯ÀÀÆ÷Àï½øÐÐÉèÖÃ.");
26            
27        }
28        
29    }
30    
31}
32
33//ÉèΪÊ×Ò³
34
35function SetHome(url)
36{
37    
38    if (document.all)
39    {
40        
41        document.body.style.behavior = 'url(#default#homepage)';
42        
43        document.body.setHomePage(url);
44        
45    }
46    else
47    {
48        
49        alert("ÄúºÃ,ÄúµÄä¯ÀÀÆ÷²»Ö§³Ö×Ô¶¯ÉèÖÃÒ³ÃæÎªÊ×Ò³¹¦ÄÜ,ÇëÄúÊÖ¶¯ÔÚä¯ÀÀÆ÷ÀïÉèÖøÃÒ³ÃæÎªÊ×Ò³!");
50        
51    }
52    
53}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.