2
2
/******/ "use strict" ;
3
3
/******/ var __webpack_modules__ = ( {
4
4
5
- /***/ 299 :
6
- /***/ ( ( __unused_webpack_module , __unused_webpack___webpack_exports__ , __webpack_require__ ) => {
5
+ /***/ 140 :
6
+ /***/ ( ( __unused_webpack___webpack_module__ , __unused_webpack___webpack_exports__ , __webpack_require__ ) => {
7
7
8
8
9
9
// EXTERNAL MODULE: ./node_modules/react/index.js
@@ -25,8 +25,9 @@ function Header(props) {
25
25
}
26
26
27
27
/* harmony default export */ const Header_Header = ( Header ) ;
28
- ; // CONCATENATED MODULE: ./content/panels/js/messages.js
28
+ ; // CONCATENATED MODULE: ./content/panels/js/messages.mjs
29
29
/* global RPMRemoveMessageListener:false, RPMAddMessageListener:false, RPMSendAsyncMessage:false */
30
+
30
31
var pktPanelMessaging = {
31
32
removeMessageListener ( messageId , callback ) {
32
33
RPMRemoveMessageListener ( messageId , callback ) ;
@@ -43,41 +44,39 @@ var pktPanelMessaging = {
43
44
// and we don't want to close a RPMSendQuery promise loop unexpectedly.
44
45
// So instead we setup a response event.
45
46
const responseMessageId = `${ messageId } _response` ;
46
-
47
47
var responseListener = responsePayload => {
48
48
callback ( responsePayload ) ;
49
49
this . removeMessageListener ( responseMessageId , responseListener ) ;
50
50
} ;
51
51
52
52
this . addMessageListener ( responseMessageId , responseListener ) ;
53
- } // Send message
54
-
53
+ }
55
54
55
+ // Send message
56
56
RPMSendAsyncMessage ( messageId , payload ) ;
57
57
} ,
58
58
59
59
// Click helper to reduce bugs caused by oversight
60
60
// from different implementations of similar code.
61
- clickHelper ( element , {
62
- source = "" ,
63
- position
64
- } ) {
61
+ clickHelper ( element , { source = "" , position } ) {
65
62
element ?. addEventListener ( `click` , event => {
66
63
event . preventDefault ( ) ;
64
+
67
65
this . sendMessage ( "PKT_openTabWithUrl" , {
68
66
url : event . currentTarget . getAttribute ( `href` ) ,
69
67
source,
70
- position
68
+ position,
71
69
} ) ;
72
70
} ) ;
73
71
} ,
74
72
75
73
log ( ) {
76
74
RPMSendAsyncMessage ( "PKT_log" , arguments ) ;
77
- }
78
-
75
+ } ,
79
76
} ;
77
+
80
78
/* harmony default export */ const messages = ( pktPanelMessaging ) ;
79
+
81
80
; // CONCATENATED MODULE: ./content/panels/js/components/TelemetryLink/TelemetryLink.jsx
82
81
/* This Source Code Form is subject to the terms of the Mozilla Public
83
82
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
@@ -390,9 +389,7 @@ function Home(props) {
390
389
}
391
390
392
391
/* harmony default export */ const Home_Home = ( Home ) ;
393
- ; // CONCATENATED MODULE: ./content/panels/js/home/overlay.js
394
- /* global Handlebars:false */
395
-
392
+ ; // CONCATENATED MODULE: ./content/panels/js/home/overlay.jsx
396
393
/*
397
394
HomeOverlay is the view itself and contains all of the methods to manipute the overlay and messaging.
398
395
It does not contain any logic for saving or communication with the extension or server.
@@ -503,7 +500,7 @@ function Signup(props) {
503
500
}
504
501
505
502
/* harmony default export */ const Signup_Signup = ( Signup ) ;
506
- ; // CONCATENATED MODULE: ./content/panels/js/signup/overlay.js
503
+ ; // CONCATENATED MODULE: ./content/panels/js/signup/overlay.jsx
507
504
/*
508
505
SignupOverlay is the view itself and contains all of the methods to manipute the overlay and messaging.
509
506
It does not contain any logic for saving or communication with the extension or server.
@@ -886,7 +883,7 @@ function Saved(props) {
886
883
}
887
884
888
885
/* harmony default export */ const Saved_Saved = ( Saved ) ;
889
- ; // CONCATENATED MODULE: ./content/panels/js/saved/overlay.js
886
+ ; // CONCATENATED MODULE: ./content/panels/js/saved/overlay.jsx
890
887
/*
891
888
SavedOverlay is the view itself and contains all of the methods to manipute the overlay and messaging.
892
889
It does not contain any logic for saving or communication with the extension or server.
@@ -931,7 +928,7 @@ SavedOverlay.prototype = {
931
928
932
929
} ;
933
930
/* harmony default export */ const saved_overlay = ( SavedOverlay ) ;
934
- ; // CONCATENATED MODULE: ./content/panels/js/style-guide/overlay.js
931
+ ; // CONCATENATED MODULE: ./content/panels/js/style-guide/overlay.jsx
935
932
936
933
937
934
@@ -1042,18 +1039,18 @@ StyleGuideOverlay.prototype = {
1042
1039
1043
1040
} ;
1044
1041
/* harmony default export */ const style_guide_overlay = ( StyleGuideOverlay ) ;
1045
- ; // CONCATENATED MODULE: ./content/panels/js/main.js
1042
+ ; // CONCATENATED MODULE: ./content/panels/js/main.mjs
1046
1043
/* This Source Code Form is subject to the terms of the Mozilla Public
1047
1044
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
1048
1045
* You can obtain one at http://mozilla.org/MPL/2.0/. */
1049
-
1050
1046
/* global RPMGetStringPref:false */
1051
1047
1052
1048
1053
1049
1054
1050
1055
1051
1056
1052
1053
+
1057
1054
var PKT_PANEL = function ( ) { } ;
1058
1055
1059
1056
PKT_PANEL . prototype = {
@@ -1078,39 +1075,37 @@ PKT_PANEL.prototype = {
1078
1075
} ,
1079
1076
1080
1077
setupObservers ( ) {
1081
- this . setupMutationObserver ( ) ; // Mutation observer isn't always enough for fast loading, static pages.
1078
+ this . setupMutationObserver ( ) ;
1079
+ // Mutation observer isn't always enough for fast loading, static pages.
1082
1080
// Sometimes the mutation observer fires before the page is totally visible.
1083
1081
// In this case, the resize tries to fire with 0 height,
1084
1082
// and because it's a static page, it only does one mutation.
1085
1083
// So in this case, we have a backup intersection observer that fires when
1086
1084
// the page is first visible, and thus, the page is going to guarantee a height.
1087
-
1088
1085
this . setupIntersectionObserver ( ) ;
1089
1086
} ,
1090
1087
1091
1088
init ( ) {
1092
1089
if ( this . inited ) {
1093
1090
return ;
1094
1091
}
1095
-
1096
1092
this . setupObservers ( ) ;
1097
1093
this . inited = true ;
1098
1094
} ,
1099
1095
1100
1096
resizeParent ( ) {
1101
1097
let clientHeight = document . body . clientHeight ;
1102
-
1103
1098
if ( this . overlay . tagsDropdownOpen ) {
1104
1099
clientHeight = Math . max ( clientHeight , 252 ) ;
1105
- } // We can ignore 0 height here.
1100
+ }
1101
+
1102
+ // We can ignore 0 height here.
1106
1103
// We rely on intersection observer to do the
1107
1104
// resize for 0 height loads.
1108
-
1109
-
1110
1105
if ( clientHeight ) {
1111
1106
messages . sendMessage ( "PKT_resizePanel" , {
1112
1107
width : document . body . clientWidth ,
1113
- height : clientHeight
1108
+ height : clientHeight ,
1114
1109
} ) ;
1115
1110
}
1116
1111
} ,
@@ -1127,46 +1122,44 @@ PKT_PANEL.prototype = {
1127
1122
1128
1123
setupMutationObserver ( ) {
1129
1124
// Select the node that will be observed for mutations
1130
- const targetNode = document . body ; // Options for the observer (which mutations to observe)
1125
+ const targetNode = document . body ;
1131
1126
1132
- const config = {
1133
- attributes : false ,
1134
- childList : true ,
1135
- subtree : true
1136
- } ; // Callback function to execute when mutations are observed
1127
+ // Options for the observer (which mutations to observe)
1128
+ const config = { attributes : false , childList : true , subtree : true } ;
1137
1129
1130
+ // Callback function to execute when mutations are observed
1138
1131
const callback = ( mutationList , observer ) => {
1139
1132
mutationList . forEach ( mutation => {
1140
1133
switch ( mutation . type ) {
1141
- case "childList" :
1142
- {
1143
- /* One or more children have been added to and/or removed
1144
- from the tree.
1145
- (See mutation.addedNodes and mutation.removedNodes.) */
1146
- this . resizeParent ( ) ;
1147
- break ;
1148
- }
1134
+ case "childList" : {
1135
+ /* One or more children have been added to and/or removed
1136
+ from the tree.
1137
+ (See mutation.addedNodes and mutation.removedNodes.) */
1138
+ this . resizeParent ( ) ;
1139
+ break ;
1140
+ }
1149
1141
}
1150
1142
} ) ;
1151
- } ; // Create an observer instance linked to the callback function
1143
+ } ;
1152
1144
1145
+ // Create an observer instance linked to the callback function
1146
+ const observer = new MutationObserver ( callback ) ;
1153
1147
1154
- const observer = new MutationObserver ( callback ) ; // Start observing the target node for configured mutations
1155
-
1148
+ // Start observing the target node for configured mutations
1156
1149
observer . observe ( targetNode , config ) ;
1157
1150
} ,
1158
1151
1159
1152
create ( ) {
1160
- const pockethost = RPMGetStringPref ( "extensions.pocket.site" ) || "getpocket.com" ;
1161
- this . overlay . create ( {
1162
- pockethost
1163
- } ) ;
1164
- }
1165
-
1153
+ const pockethost =
1154
+ RPMGetStringPref ( "extensions.pocket.site" ) || "getpocket.com" ;
1155
+ this . overlay . create ( { pockethost } ) ;
1156
+ } ,
1166
1157
} ;
1158
+
1167
1159
window . PKT_PANEL = PKT_PANEL ;
1168
1160
window . pktPanelMessaging = messages ;
1169
1161
1162
+
1170
1163
/***/ } )
1171
1164
1172
1165
/******/ } ) ;
@@ -1294,7 +1287,7 @@ window.pktPanelMessaging = messages;
1294
1287
/******/ // startup
1295
1288
/******/ // Load entry module and return exports
1296
1289
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
1297
- /******/ var __webpack_exports__ = __webpack_require__ . O ( undefined , [ 736 ] , ( ) => ( __webpack_require__ ( 299 ) ) )
1290
+ /******/ var __webpack_exports__ = __webpack_require__ . O ( undefined , [ 736 ] , ( ) => ( __webpack_require__ ( 140 ) ) )
1298
1291
/******/ __webpack_exports__ = __webpack_require__ . O ( __webpack_exports__ ) ;
1299
1292
/******/
1300
1293
/******/ } ) ( )
0 commit comments