diff --git a/README.md b/README.md index 110cf9e..1f561cf 100644 --- a/README.md +++ b/README.md @@ -124,13 +124,14 @@ an the option `sampler.removeIndentation`. The default value is `false`. } ``` -### Fetcher URL -Defining the fetcher URL will prefix all snippet requests with it. +### Proxy URL +Defining the proxy URL will prefix all snippet requests with it. This allows you to use a script to access the +snippet files. ```js { sampler : { - fetcherURL: 'task.php?file=' + proxyURL: 'task.php?file=' } } ``` diff --git a/sampler.js b/sampler.js index 1d3dd38..9e4bc70 100644 --- a/sampler.js +++ b/sampler.js @@ -165,14 +165,14 @@ var config = Reveal.getConfig() || {}; config.sampler = config.sampler || {}; var options = { - fetcherURL: config.sampler.fetcherURL || '', + proxyURL: config.sampler.proxyURL || '', removeIndentation: !!config.sampler.removeIndentation }; var elements = document.querySelectorAll('[data-sample]'); elements.forEach(function(element) { var slug = element.getAttribute('data-sample').match(/([^#]+)(?:#(.+))?/); - var file = options.fetcherURL + slug[1]; + var file = options.proxyURL + slug[1]; var selector = slug[2]; var extractor = getSnippetExtractor(selector);