@@ -34,6 +34,10 @@ var targetPageURL;
3434var targetPageHostname ;
3535var targetPageDomain ;
3636
37+ var matrixCellHotspots = null ;
38+
39+ /******************************************************************************/
40+
3741function getPageStats ( ) {
3842 return HTTPSB . pageStatsFromTabId ( targetTabId ) ;
3943}
@@ -201,7 +205,6 @@ var HTTPSBPopup = {
201205
202206 matrixStats : MatrixStats . prototype . createMatrixStats ( ) ,
203207 matrixHeaderTypes : [ '*' ] ,
204- matrixCellHotspots : null ,
205208 matrixHasRows : false ,
206209 matrixGroup3Collapsed : false ,
207210
@@ -1137,8 +1140,8 @@ function makeMenu() {
11371140 }
11381141
11391142 // https://github.com/gorhill/httpswitchboard/issues/31
1140- if ( HTTPSBPopup . matrixCellHotspots ) {
1141- HTTPSBPopup . matrixCellHotspots . detach ( ) ;
1143+ if ( matrixCellHotspots ) {
1144+ matrixCellHotspots . detach ( ) ;
11421145 }
11431146
11441147 renderMatrixHeaderRow ( ) ;
@@ -1490,11 +1493,11 @@ function buttonReloadHandler() {
14901493/******************************************************************************/
14911494
14921495function mouseenterMatrixCellHandler ( ) {
1493- HTTPSBPopup . matrixCellHotspots . appendTo ( this ) ;
1496+ matrixCellHotspots . appendTo ( this ) ;
14941497}
14951498
14961499function mouseleaveMatrixCellHandler ( ) {
1497- HTTPSBPopup . matrixCellHotspots . detach ( ) ;
1500+ matrixCellHotspots . detach ( ) ;
14981501}
14991502
15001503/******************************************************************************/
@@ -1599,18 +1602,18 @@ $(function() {
15991602 $ ( 'body' ) . css ( 'font-size' , getUserSetting ( 'displayTextSize' ) ) ;
16001603
16011604 // We reuse for all cells the one and only cell hotspots.
1602- popup . matrixCellHotspots = $ ( '#cellHotspots' ) . detach ( ) ;
1603- $ ( '#whitelist' , popup . matrixCellHotspots )
1605+ matrixCellHotspots = $ ( '#cellHotspots' ) . detach ( ) ;
1606+ $ ( '#whitelist' , matrixCellHotspots )
16041607 . on ( 'click' , function ( ) {
16051608 handleWhitelistFilter ( $ ( this ) ) ;
16061609 return false ;
16071610 } ) ;
1608- $ ( '#blacklist' , popup . matrixCellHotspots )
1611+ $ ( '#blacklist' , matrixCellHotspots )
16091612 . on ( 'click' , function ( ) {
16101613 handleBlacklistFilter ( $ ( this ) ) ;
16111614 return false ;
16121615 } ) ;
1613- $ ( '#domainOnly' , popup . matrixCellHotspots )
1616+ $ ( '#domainOnly' , matrixCellHotspots )
16141617 . on ( 'click' , function ( ) {
16151618 toggleCollapseState ( this ) ;
16161619 return false ;
0 commit comments