Please see the script below
var myEventListener = app.eventListeners.add("afterOpen", placeFilesOnDoubleClick, false);
var myEventListener = app.eventListeners.add("afterClose", placeFilesOnDoubleClick1, false);
app.conditionalTextPreferences.showConditionIndicators = ConditionIndicatorMode.SHOW_AND_PRINT_INDICATORS;
Setting this property for app relates to a new doc created from this time.
Set this property to activeDocument instead of app.
app.activeDocument.conditionalTextPreferences.showConditionIndicators = ConditionIndicatorMode.SHOW_AND_PRINT_INDICATORS;
Be awared that afterOpen event is triggered twice: after opening a doc and after opening a window for this doc.
However in your case it just set same property twice, so doesn't matter
It is working fine.