From 8158adb9bbdfbd387e358227dfd9c1836cd40819 Mon Sep 17 00:00:00 2001 From: Thomas Weinert Date: Mon, 3 Dec 2018 19:58:01 +0100 Subject: [PATCH] Rename sampler.fetcherURL to sampler.proxyURL because it matches the purpose better --- README.md | 7 ++++--- sampler.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) 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);