-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
860c787
commit 94fc67a
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export default { | ||
"templates/write-canyon-to-local-template.js": "(function () {\n var globalObj = undefined;\n try {\n globalObj = new Function('return this')();\n } catch (e) {\n if (typeof window !== \"undefined\") {\n globalObj = window;\n } else if (typeof global !== \"undefined\") {\n globalObj = global;\n } else {\n // do nothing\n }\n }\n if (globalObj){\n\n // ***start***\n\n if (globalObj.isDocumentAddVisibilitychangeWriteCanyonToLocal) {\n } else {\n globalObj.isDocumentAddVisibilitychangeWriteCanyonToLocal = true\n if (globalObj.document && globalObj.document.addEventListener) {\n if (globalObj.writeCanyonToLocal) {\n globalObj.manualWriteCanyonToLocal = function () {\n globalObj.writeCanyonToLocal(JSON.stringify({\n coverage: globalObj.__coverage__,\n canyon: globalObj.__canyon__\n }))\n }\n }\n globalObj.document.addEventListener('visibilitychange', function () {\n if (globalObj.document.visibilityState === 'hidden') {\n if (globalObj.writeCanyonToLocal) {\n globalObj.writeCanyonToLocal(JSON.stringify({\n coverage: globalObj.__coverage__,\n canyon: globalObj.__canyon__\n }))\n } else {\n console.log('writeCanyonToLocal is not defined')\n }\n }\n });\n }\n }\n\n // **end***\n }\n})()\n" | ||
"templates/write-canyon-to-local-template.js": "(function () {\n var globalObj = undefined;\n try {\n globalObj = new Function('return this')();\n } catch (e) {\n if (typeof window !== \"undefined\") {\n globalObj = window;\n } else if (typeof global !== \"undefined\") {\n globalObj = global;\n } else {\n // do nothing\n }\n }\n if (globalObj){\n\n // ***start***\n\n if (globalObj.isDocumentAddVisibilitychangeWriteCanyonToLocal) {\n } else {\n globalObj.isDocumentAddVisibilitychangeWriteCanyonToLocal = true\n if (globalObj.document && globalObj.document.addEventListener) {\n if (globalObj.writeCanyonToLocal) {\n globalObj.manualWriteCanyonToLocal = function () {\n globalObj.writeCanyonToLocal(JSON.stringify({\n coverage: globalObj.__coverage__,\n canyon: globalObj.__canyon__ || (Object.keys(globalObj.__coverage__).length>0?Object.values(globalObj.__coverage__)[0]:undefined)\n }))\n }\n }\n globalObj.document.addEventListener('visibilitychange', function () {\n if (globalObj.document.visibilityState === 'hidden') {\n if (globalObj.writeCanyonToLocal) {\n globalObj.writeCanyonToLocal(JSON.stringify({\n coverage: globalObj.__coverage__,\n canyon: globalObj.__canyon__ || (Object.keys(globalObj.__coverage__).length>0?Object.values(globalObj.__coverage__)[0]:undefined)\n }))\n } else {\n console.log('writeCanyonToLocal is not defined')\n }\n }\n });\n }\n }\n\n // **end***\n }\n})()\n" | ||
} |