「選項」標籤頁

一般選項

網站選項

NoSquint 認為,網站是網路上的一個位置 (web location),此位置 (location) 下的所有網頁要有相同的縮放大小,而其網頁的網址 (URL) 決定了網站的名稱。

大部分情況下,網站名稱即是網域。假如,某網頁的網址為 www2.ibm.com/index.php,則 NoSquint 會將網站名稱判定為 ibm.com。NoSquint 也會考慮到常見的次級網域。假如,你正瀏覽 www.bbc.co.uk,則 NoSquint 會將網站名稱判定為 bbc.co.uk

此預設行為始終應該如此,當它不是如此時,你可以在「例外」標籤頁中告訴 NoSquint 如何決定各個網站的名稱。

「例外」標籤頁

因為並不是所有網站的名稱都是相同的結構。有時,NoSquint 決定網站名稱之預設邏輯,並不是你所想要的。由「例外」,你可以告訴 NoSquint 如何決定各個網站名稱之組成。

使用實例

「例外」是很有用的表達方式,但是可能會很難了解。在詳細解釋之前,先研究看看一般的使用實例。希望其中一個例子能符合你的情況。

  1. 例子:SourceForge 之子網域不同。例如 freevo.sourceforge.netaudacity.sourceforge.net 被誤認為相同的網站(sourceforge.net
    解法:新增一例外規則 *.sourceforge.net
  2. 例子:example.com/users/maryexample.com/users/john 被誤認為相同的網站(example.com
    解法:新增一例外規則 example.com/users/*
  3. 例子:我想要 Google Mail(mail.google.com)和 Google 閱讀器(google.com/reader)不同於 google.com 網站。
    解法:新增一例外規則 mail.google.com,還有另一個例外規則 google.com/reader
  4. 例子:公司之內部網路位置是 intra.example.com,我要位置在 intra.example.com/wiki 的 wiki 不同於其餘內部網路。
    解法:新增一例外規則 intra.example.com/wiki
  5. 例子:Google Mail、Google Groups,事實上這些所有 Google 上的主機,都應該要當成各別的網站。但是從網站之各國語言(頂級網域)來看,應該不重要。因此,mail.google.ca 網站應該與 mail.google.de 網站相同。而 groups.google.de 網站應該與 groups.google.fi 網站相同。
    解法:新增一例外規則 *.google.[*]
  6. 例子:公司之網路應用程式分散於多個伺服器中。example.com/server1/apps/app1 應該要與 example.com/server2/apps/app1 網站相同。但是也還有不同的網站 example.com/server1/apps/app3
    解法:新增一例外規則 example.com/[*]/apps/*
  7. 例子:同以上例子,但是 server 有時候不在網址 (URL) 中,因此 example.com/apps/app1 要與 example.com/server1/apps/app1 網站相同。
    解法:新增一例外規則 example.com/[**]apps/*

詳細解釋 (Gory Details)

以下是「例外」在技術上的解釋。你不是進階使用者的話,這一部份會令你感到相當的困難;你反而是要查閱以上的例子。

例外規則中,也許會包含零個或者數個萬用字元:

網站名稱是代表一網站之隨意字串,是 NoSquint 依目前頁面之網址 (URL) 及使用者定義之例外清單所判定。例如,foo.example.commyapp.*.example.com 這兩種的網站名稱之判定,是取決於被定義之「例外」。NoSquint 是依網站名稱來查詢縮放大小,而被 NoSquint 決定的網站名稱,預設顯示在狀態列上,目前縮放大小的旁邊(譯者註:這裡「縮放大小的旁邊」,是 1.0.x 的顯示方式,作者可能沒注意到)。

中括號括住萬用字元時(即 [*][**]),字面上的萬用字元(即 ***)會被當成網站名稱使用,取代萬用字元代表之字元。這可讓你將各網站位置 (locations) 組在一起。假如,一頁面之網址是 google.ca,而你定義了一個「例外」google.[*],所以網站名稱會是 google.*。因為 google.fi 符合此規則,所以網站名稱也是 google.*。所以,google.cagoogle.fi 會被判定為相同的網站。

Hostnames and paths are evaluated separately; an exception pattern is split into two sub-patterns, one for the host, and one for the path. These sub-patterns match substrings, but hosts are right-anchored, while paths are left-anchored. This means that any wildcards specified in the host name will not match any characters in the path, and vice versa. When the hostname part of a pattern is only *, it matches the domain of the page's URL. For example, for www.google.com, a single * matches google.com; for www.bbc.co.uk it matches bbc.co.uk.

When multiple exceptions match a page's URL, NoSquint will use the exception that matches the most non-wildcard characters in the host name. If there are still multiple exceptions in that narrowed list, the exception that matches the most non-wildcard characters in the path is then chosen. If still there are multiple exceptions, the first one that matched is chosen.