diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 710afd82d2..79b7cbb952 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -122,10 +122,7 @@ executing the `host-examples` build target:
After running `host-examples` you can now open the examples index page in the browser, for example: . (This assumes that the `hosted` directory is a web directory, served by Apache for example.)
-Append `?mode=debug` or `?mode=raw` to make the example work in full debug mode. In
-full debug mode the OpenLayers and Closure Library scripts are loaded individually by
-the Closure Library's `base.js` script (which the example page loads and
-executes before any other script).
+Append `?mode=raw` to make the example work in full debug mode. In raw mode the OpenLayers and Closure Library scripts are loaded individually by the Closure Library's `base.js` script (which the example page loads and executes before any other script).
## Running tests
diff --git a/bin/loader_hosted_examples.js b/bin/loader_hosted_examples.js
index 96be6e81f4..46b07bd0c8 100644
--- a/bin/loader_hosted_examples.js
+++ b/bin/loader_hosted_examples.js
@@ -54,20 +54,11 @@
}
}
- var oljs = 'ol.js', mode;
- if ('mode' in pageParams) {
- mode = pageParams.mode.toLowerCase();
- if (mode == 'debug') {
- mode = 'raw';
- }
- if (mode != 'advanced' && mode != 'raw') {
- oljs = 'ol-' + mode + '.js';
- }
- }
+ var raw = pageParams.mode && pageParams.mode.toLowerCase() === 'raw';
var scriptId = encodeURIComponent(scriptParams.id);
- if (mode != 'raw') {
- document.write('');
+ if (!raw) {
+ document.write('');
} else {
window.CLOSURE_NO_DEPS = true; // we've got our own deps file
document.write('');