mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-02 10:24:59 +12:00
bring back behind-the-scene matrix
This commit is contained in:
parent
1626c3ecc6
commit
85437661bf
|
@ -30,7 +30,7 @@ uDom('a').attr('target', '_blank');
|
|||
uDom('a[href*="dashboard.html"]').attr('target', '_parent');
|
||||
uDom('.whatisthis').on('click', function() {
|
||||
uDom(this).parent()
|
||||
.find('.whatisthis-expandable')
|
||||
.descendants('.whatisthis-expandable')
|
||||
.toggleClass('whatisthis-expanded');
|
||||
});
|
||||
|
||||
|
|
|
@ -86,16 +86,17 @@ var matrixSnapshot = function(details) {
|
|||
popupScopeLevel: µmuser.popupScopeLevel
|
||||
}
|
||||
};
|
||||
/*
|
||||
// Allow to scope on behind-the-scene virtual tab
|
||||
if ( tab.url.indexOf('chrome-extension://' + chrome.runtime.id + '/') === 0 ) {
|
||||
targetTabId = µm.behindTheSceneTabId;
|
||||
targetPageURL = µm.behindTheSceneURL;
|
||||
} else {
|
||||
targetTabId = tab.id;
|
||||
targetPageURL = µm.pageUrlFromTabId(targetTabId);
|
||||
|
||||
// Allow examination of behind-the-scene requests
|
||||
// TODO: Not portable
|
||||
if ( details.tabURL ) {
|
||||
if ( details.tabURL.indexOf('chrome-extension://' + chrome.runtime.id + '/') === 0 ) {
|
||||
details.tabId = µm.behindTheSceneTabId;
|
||||
} else if ( details.tabURL === µm.behindTheSceneURL ) {
|
||||
details.tabId = µm.behindTheSceneTabId;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
var pageStore = µm.pageStatsFromTabId(details.tabId);
|
||||
if ( !pageStore ) {
|
||||
return r;
|
||||
|
|
|
@ -1059,13 +1059,16 @@ var onMatrixSnapshotReady = function(response) {
|
|||
var queryMatrixSnapshot = function(callback) {
|
||||
var request = {
|
||||
what: 'matrixSnapshot',
|
||||
tabId: targetTabId
|
||||
tabId: targetTabId,
|
||||
tabURL: matrixSnapshot.url
|
||||
};
|
||||
var onTabsReceived = function(tabs) {
|
||||
if ( tabs.length === 0 ) {
|
||||
return;
|
||||
}
|
||||
request.tabId = targetTabId = tabs[0].id;
|
||||
var tab = tabs[0];
|
||||
request.tabId = targetTabId = tab.id;
|
||||
request.tabURL = tab.url;
|
||||
messaging.ask(request, callback);
|
||||
};
|
||||
if ( targetTabId === undefined ) {
|
||||
|
|
Loading…
Reference in a new issue