Browse Source

various fixes

pull/2/head
gorhill 10 years ago
parent
commit
52540c1a9a
  1. 11
      platform/firefox/install.rdf
  2. 2
      platform/firefox/options.xul
  3. 4
      platform/firefox/vapi-background.js
  4. 17
      src/_locales/en/messages.json
  5. 17
      src/js/logger-ui.js
  6. 6
      src/js/traffic.js

11
platform/firefox/install.rdf

@ -17,18 +17,9 @@
<targetApplication> <targetApplication>
<r:Description> <r:Description>
<id>{{ec8030f7-c20a-464f-9b0e-13a3a9e97384}}</id> <id>{{ec8030f7-c20a-464f-9b0e-13a3a9e97384}}</id>
<minVersion>24.0</minVersion>
<minVersion>29.0</minVersion>
<maxVersion>40.0</maxVersion> <maxVersion>40.0</maxVersion>
</r:Description> </r:Description>
</targetApplication> </targetApplication>
<!-- SeaMonkey -->
<targetApplication>
<r:Description>
<id>{{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}}</id>
<minVersion>2.21</minVersion>
<maxVersion>2.37</maxVersion>
</r:Description>
</targetApplication>
</r:Description> </r:Description>
</r:RDF> </r:RDF>

2
platform/firefox/options.xul

@ -3,7 +3,7 @@
<setting type="control"> <setting type="control">
<vbox> <vbox>
<button id="showDashboardButton"/> <button id="showDashboardButton"/>
<button id="showNetworkLogButton"/>
<button id="showLoggerButton"/>
</vbox> </vbox>
</setting> </setting>
</vbox> </vbox>

4
platform/firefox/vapi-background.js

@ -1815,7 +1815,7 @@ var optionsObserver = {
} }
this.setupOptionsButton(doc, 'showDashboardButton', 'dashboard.html'); this.setupOptionsButton(doc, 'showDashboardButton', 'dashboard.html');
this.setupOptionsButton(doc, 'showNetworkLogButton', 'devtools.html');
this.setupOptionsButton(doc, 'showLoggerButton', 'logger-ui.html');
} }
}; };
@ -1895,6 +1895,7 @@ vAPI.browserData.clearOrigin = function(/* domain */) {
/******************************************************************************/ /******************************************************************************/
/******************************************************************************/ /******************************************************************************/
// https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsICookieManager2
// https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsICookie2 // https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsICookie2
// https://developer.mozilla.org/en-US/docs/Observer_Notifications#Cookies // https://developer.mozilla.org/en-US/docs/Observer_Notifications#Cookies
@ -1930,7 +1931,6 @@ vAPI.cookies.observe = function(subject, topic, reason) {
if ( topic !== 'cookie-changed' ) { if ( topic !== 'cookie-changed' ) {
return; return;
} }
// https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsICookieService
if ( reason === 'deleted' || subject instanceof Ci.nsICookie2 === false ) { if ( reason === 'deleted' || subject instanceof Ci.nsICookie2 === false ) {
return; return;
} }

17
src/_locales/en/messages.json

@ -169,7 +169,7 @@
"description": "" "description": ""
}, },
"statsPageDetailedBehindTheScenePage" : { "statsPageDetailedBehindTheScenePage" : {
"message": "Chromium: Behind the scene",
"message": "Behind the scene",
"description": "" "description": ""
}, },
"statsPageOverview" : { "statsPageOverview" : {
@ -337,7 +337,7 @@
"description": "Second part of 'Delete non-blocked session cookies [n] minutes after the last time they have been used'" "description": "Second part of 'Delete non-blocked session cookies [n] minutes after the last time they have been used'"
}, },
"privacyDeleteNonBlockedSessionCookiesHelp" : { "privacyDeleteNonBlockedSessionCookiesHelp" : {
"message": "<p><a href='http://www.w3.org/2001/tag/2010/09/ClientSideStorage.html'>W3C</a>: &ldquo;A session cookie ... is erased when you end the browser session. The session cookie is stored in temporary memory and is not retained after the browser is closed.&rdquo;</p><p>Except that this <a href='https://code.google.com/p/chromium/issues/detail?id=128513'>might not be happening</a> when using a Chromium-based browser. Also, to some, having to close the browser in order for the session cookies to clear might not be early enough.</p>",
"message": "<p><a href='http://www.w3.org/2001/tag/2010/09/ClientSideStorage.html'>W3C</a>: &ldquo;A session cookie ... is erased when you end the browser session. The session cookie is stored in temporary memory and is not retained after the browser is closed.&rdquo;</p><p>Except that this <a href='https://code.google.com/p/chromium/issues/detail?id=128513'>might not be happening</a> in some browsers. Also, to some, having to close the browser in order for the session cookies to clear might not be early enough.</p>",
"description": "" "description": ""
}, },
"privacyDeleteBlockedLocalStoragePrompt" : { "privacyDeleteBlockedLocalStoragePrompt" : {
@ -397,11 +397,11 @@
"description": "" "description": ""
}, },
"privacyBehindTheSceneHeader" : { "privacyBehindTheSceneHeader" : {
"message": "Chromium: behind-the-scene requests",
"message": "Behind-the-scene requests",
"description": "" "description": ""
}, },
"privacyProcessBehindTheSceneHelp" : { "privacyProcessBehindTheSceneHelp" : {
"message": "<p>According to <a href='https://www.google.com/intl/en/chrome/browser/privacy/whitepaper.html'>Google Chrome Privacy Whitepaper</a>, <i>Chromium</i> might send HTTP requests to <i>Google</i> without the user expressly visiting a web page. Let's call these special requests <strong>behind-the-scene</strong> requests. Also, other installed browser extensions can send <strong>behind-the-scene</strong> HTTP requests.</p><p><i>uMatrix</i> lets you intercept and treat these requests like any other request: they can be processed in order to allow/block them as per your whitelist/blacklist.</p><p>Click the extension icon while viewing this page to get started. Required reading: <a href='https://github.com/gorhill/httpswitchboard/wiki/Behind-the-scene-requests'>Behind-the-scene requests</a>.</p><div class='warn'><p><span style='color:red; font-weight:bold'>Beware!</span> Blocking <strong>behind-the-scene</strong> net requests is potentially causing <a href='https://github.com/gorhill/httpswitchboard/issues/27'>an issue</a> when the user wants to install an extension from the Chrome store (including maybe preventing extensions from being updated), hence the ability to disable the feature here. Blocking can also cause other installed extensions to not work properly (those querying for remote data).</p><p>Even if this feature is not enabled, <strong>behind-the-scene</strong> requests are still logged by <i>uMatrix</i>. You can inspect these requests on the <a href='dashboard.html#statistics'>Statistics</a> page.</p>",
"message": "",
"description": "" "description": ""
}, },
@ -667,6 +667,15 @@
"description":"English: {{value}} days ago" "description":"English: {{value}} days ago"
}, },
"showDashboardButton":{
"message":"Dashboard",
"description":"Appears in Firefox's add-on preferences"
},
"showLoggerButton":{
"message":"Logger",
"description":"Appears in Firefox's add-on preferences"
},
"errorCantConnectTo":{ "errorCantConnectTo":{
"message":"Network error: Unable to connect to {{url}}", "message":"Network error: Unable to connect to {{url}}",
"description":"" "description":""

17
src/js/logger-ui.js

@ -224,7 +224,7 @@ var renderLogEntry = function(entry) {
tr.classList.add('cat_' + entry.cat); tr.classList.add('cat_' + entry.cat);
} }
rowFilterer.filterOne(tr);
rowFilterer.filterOne(tr, true);
tbody.insertBefore(tr, tbody.firstChild); tbody.insertBefore(tr, tbody.firstChild);
}; };
@ -392,11 +392,11 @@ var rowFilterer = (function() {
if ( not ) { if ( not ) {
rawPart = rawPart.slice(1); rawPart = rawPart.slice(1);
} }
hardBeg = rawPart.charAt(0) === '[';
hardBeg = rawPart.charAt(0) === '|';
if ( hardBeg ) { if ( hardBeg ) {
rawPart = rawPart.slice(1); rawPart = rawPart.slice(1);
} }
hardEnd = rawPart.slice(-1) === ']';
hardEnd = rawPart.slice(-1) === '|';
if ( hardEnd ) { if ( hardEnd ) {
rawPart = rawPart.slice(0, -1); rawPart = rawPart.slice(0, -1);
} }
@ -419,15 +419,18 @@ var rowFilterer = (function() {
} }
}; };
var filterOne = function(tr) {
var cl = tr.classList;
var filterOne = function(tr, clean) {
var ff = filters;
var fcount = ff.length;
if ( fcount === 0 && clean === true ) {
return;
}
// do not filter out doc boundaries, they help separate important // do not filter out doc boundaries, they help separate important
// section of log. // section of log.
var cl = tr.classList;
if ( cl.contains('doc') ) { if ( cl.contains('doc') ) {
return; return;
} }
var ff = filters;
var fcount = ff.length;
if ( fcount === 0 ) { if ( fcount === 0 ) {
cl.remove('f'); cl.remove('f');
return; return;

6
src/js/traffic.js

@ -100,12 +100,6 @@ var onBeforeRequestHandler = function(details) {
return; return;
} }
// Do not block myself from updating assets
// https://github.com/gorhill/httpswitchboard/issues/202
if ( requestType === 'xhr' && requestURL.lastIndexOf(µm.projectServerRoot, 0) === 0 ) {
return;
}
// Re-classify orphan HTTP requests as behind-the-scene requests. There is // Re-classify orphan HTTP requests as behind-the-scene requests. There is
// not much else which can be done, because there are URLs // not much else which can be done, because there are URLs
// which cannot be handled by µMatrix, i.e. `opera://startpage`, // which cannot be handled by µMatrix, i.e. `opera://startpage`,

Loading…
Cancel
Save