Added a manifest check in the www/ directory.
Added a manifest check in the www/ directory.

This is where the manifest is located in cordova Chrome apps.
Also refactored to remove duplicate code.

ussuri/chromedeveditor,beaufortfrancois/chromedeveditor,vivalaralstin/chromedeveditor,yikaraman/chromedeveditor,ussuri/chromedeveditor,2947721120/chromedeveditor,hxddh/chromedeveditor,valmzetvn/chromedeveditor,googlearchive/chromedeveditor,hxddh/chromedeveditor,b0dh1sattva/chromedeveditor,modulexcite/chromedeveditor,vivalaralstin/chromedeveditor,b0dh1sattva/chromedeveditor,modulexcite/chromedeveditor,2947721120/choredev,2947721120/choredev,2947721120/choredev,yikaraman/chromedeveditor,modulexcite/chromedeveditor,valmzetvn/chromedeveditor,yikaraman/chromedeveditor,valmzetvn/chromedeveditor,devoncarew/spark,devoncarew/spark,b0dh1sattva/chromedeveditor,ussuri/chromedeveditor,yikaraman/chromedeveditor,googlearchive/chromedeveditor,modulexcite/chromedeveditor,yikaraman/chromedeveditor,googlearchive/chromedeveditor,modulexcite/chromedeveditor,devoncarew/spark,hxddh/chromedeveditor,beaufortfrancois/chromedeveditor,beaufortfrancois/chromedeveditor,googlearchive/chromedeveditor,ussuri/chromedeveditor,modulexcite/chromedeveditor,2947721120/chromedeveditor,b0dh1sattva/chromedeveditor,2947721120/choredev,yikaraman/chromedeveditor,b0dh1sattva/chromedeveditor,2947721120/chromedeveditor,2947721120/choredev,2947721120/chromedeveditor,beaufortfrancois/chromedeveditor,hxddh/chromedeveditor,beaufortfrancois/chromedeveditor,2947721120/choredev,hxddh/chromedeveditor,beaufortfrancois/chromedeveditor,hxddh/chromedeveditor,yikaraman/chromedeveditor,devoncarew/spark,ussuri/chromedeveditor,valmzetvn/chromedeveditor,vivalaralstin/chromedeveditor,devoncarew/spark,b0dh1sattva/chromedeveditor,2947721120/chromedeveditor,valmzetvn/chromedeveditor,googlearchive/chromedeveditor,vivalaralstin/chromedeveditor,2947721120/choredev,vivalaralstin/chromedeveditor,ussuri/chromedeveditor,2947721120/chromedeveditor,ussuri/chromedeveditor,googlearchive/chromedeveditor,vivalaralstin/chromedeveditor,vivalaralstin/chromedeveditor,hxddh/chromedeveditor,devoncarew/spark,b0dh1sattva/chromedeveditor,valmzetvn/chromedeveditor,googlearchive/chromedeveditor,modulexcite/chromedeveditor,valmzetvn/chromedeveditor,beaufortfrancois/chromedeveditor,2947721120/chromedeveditor