From b131af8f687391324b0b3af1e3434d8ebf53ac70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Fr=C3=B6hle?= Date: Mon, 18 Feb 2019 10:59:14 +0100 Subject: [PATCH] debug AutomaticDisposeFaye --- dist/autoloader.js | 2 +- dist/autoloaderV2.js | 31 ++++++++++++++++++------------- src/autoloaderV2.js | 29 +++++++++++++++++------------ 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/dist/autoloader.js b/dist/autoloader.js index c663136..14fe3cd 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Mon Feb 18 2019 10:49:44 GMT+0100 (CET)*/ +/*Generated on:Mon Feb 18 2019 10:59:13 GMT+0100 (CET)*/ var AutomaticDispose_Branch = "master"; var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/"; var da_lss_adis_time = new Date().getTime(); diff --git a/dist/autoloaderV2.js b/dist/autoloaderV2.js index 3f85793..80f6c8d 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Mon Feb 18 2019 10:49:44 GMT+0100 (CET)*/ +/*Generated on:Mon Feb 18 2019 10:59:13 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -4475,6 +4475,11 @@ //# sourceMappingURL=dexie.js.map + // Helper Scripts + String.prototype.replaceAll = function (find, replace) { + return this.replace(new RegExp(find.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"), "g"), replace); + } + class AutomaticDisposeFaye { constructor(myFaye) { let self = this; @@ -4504,18 +4509,18 @@ } replaceWithPrefix(data) { - return data.replace('allianceChat', 'this.allianceChat') - .replace('mission_participation_add', 'this.mission_participation_add') - .replace('missionDelete', 'this.missionDelete') - .replace('missionInvolved', 'this.missionInvolved') - .replace('missionMarkerAdd', 'this.missionMarkerAdd') - .replace('patientDelete', 'this.patientDelete') - .replace('patientMarkerAdd', 'this.patientMarkerAdd') - .replace('prisonerMarkerAdd', 'this.prisonerMarkerAdd') - .replace('radioMessage', 'this.radioMessage') - .replace('vehicleDrive', 'this.vehicleDrive') - .replace('vehicleMarkerAdd', 'this.vehicleMarkerAdd') - .replace('user_id', 'window.user_id') + return data.replaceAll('allianceChat', 'this.allianceChat') + .replaceAll('mission_participation_add', 'this.mission_participation_add') + .replaceAll('missionDelete', 'this.missionDelete') + .replaceAll('missionInvolved', 'this.missionInvolved') + .replaceAll('missionMarkerAdd', 'this.missionMarkerAdd') + .replaceAll('patientDelete', 'this.patientDelete') + .replaceAll('patientMarkerAdd', 'this.patientMarkerAdd') + .replaceAll('prisonerMarkerAdd', 'this.prisonerMarkerAdd') + .replaceAll('radioMessage', 'this.radioMessage') + .replaceAll('vehicleDrive', 'this.vehicleDrive') + .replaceAll('vehicleMarkerAdd', 'this.vehicleMarkerAdd') + .replaceAll('user_id', 'window.user_id') } allianceChat(data) { diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index c41114a..d7a1ab9 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -1,5 +1,10 @@ //=require ../node_modules/dexie/dist/dexie.js + // Helper Scripts + String.prototype.replaceAll = function (find, replace) { + return this.replace(new RegExp(find.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"), "g"), replace); + } + class AutomaticDisposeFaye { constructor(myFaye) { let self = this; @@ -29,18 +34,18 @@ } replaceWithPrefix(data) { - return data.replace('allianceChat', 'this.allianceChat') - .replace('mission_participation_add', 'this.mission_participation_add') - .replace('missionDelete', 'this.missionDelete') - .replace('missionInvolved', 'this.missionInvolved') - .replace('missionMarkerAdd', 'this.missionMarkerAdd') - .replace('patientDelete', 'this.patientDelete') - .replace('patientMarkerAdd', 'this.patientMarkerAdd') - .replace('prisonerMarkerAdd', 'this.prisonerMarkerAdd') - .replace('radioMessage', 'this.radioMessage') - .replace('vehicleDrive', 'this.vehicleDrive') - .replace('vehicleMarkerAdd', 'this.vehicleMarkerAdd') - .replace('user_id', 'window.user_id') + return data.replaceAll('allianceChat', 'this.allianceChat') + .replaceAll('mission_participation_add', 'this.mission_participation_add') + .replaceAll('missionDelete', 'this.missionDelete') + .replaceAll('missionInvolved', 'this.missionInvolved') + .replaceAll('missionMarkerAdd', 'this.missionMarkerAdd') + .replaceAll('patientDelete', 'this.patientDelete') + .replaceAll('patientMarkerAdd', 'this.patientMarkerAdd') + .replaceAll('prisonerMarkerAdd', 'this.prisonerMarkerAdd') + .replaceAll('radioMessage', 'this.radioMessage') + .replaceAll('vehicleDrive', 'this.vehicleDrive') + .replaceAll('vehicleMarkerAdd', 'this.vehicleMarkerAdd') + .replaceAll('user_id', 'window.user_id') } allianceChat(data) {