@inboxsdk/core 2.2.11 → 2.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inboxsdk/core",
3
- "version": "2.2.11",
3
+ "version": "2.2.14",
4
4
  "description": "Library for building browser extensions for Gmail",
5
5
  "main": "inboxsdk.js",
6
6
  "author": "Streak",
package/pageWorld.js CHANGED
@@ -3033,14 +3033,16 @@ function setupGmailInterceptorOnFrames(mainFrame, jsFrame) {
3033
3033
  }
3034
3034
  });
3035
3035
  const saveXsrfTokenHeader = header => {
3036
- document.head.setAttribute('data-inboxsdk-xsrf-token', header);
3037
- triggerEvent({
3038
- type: 'xsrfTokenHeaderReceived'
3039
- });
3036
+ if (header !== document.head.getAttribute('data-inboxsdk-xsrf-token')) {
3037
+ document.head.setAttribute('data-inboxsdk-xsrf-token', header);
3038
+ triggerEvent({
3039
+ type: 'xsrfTokenHeaderReceived'
3040
+ });
3041
+ }
3040
3042
  };
3041
3043
  main_wrappers.push({
3042
3044
  isRelevantTo(connection) {
3043
- return /sync(?:\/u\/\d+)?\//.test(connection.url) && !document.head.hasAttribute('data-inboxsdk-xsrf-token');
3045
+ return /sync(?:\/u\/\d+)?\//.test(connection.url);
3044
3046
  },
3045
3047
  originalSendBodyLogger(connection) {
3046
3048
  if (connection.headers['X-Framework-Xsrf-Token']) {