1
0
Fork 0

add Reveal.getConfig(), replace use of window.globals (#98)

This commit is contained in:
Hakim El Hattab 2013-03-08 19:05:58 -05:00
parent 2bd5e8b65b
commit 825fe51de9
5 changed files with 15 additions and 14 deletions

View File

@ -358,13 +358,12 @@ function linkify( selector ) {
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
globals: {
// Generate a unique id and secret at http://revealjs.jit.su/token // Generate a unique id and secret at http://revealjs.jit.su/token
multiplex: { multiplex: {
id: '7d10234555b923e2', id: '',
secret: '13627859051503309760', secret: '',
url: 'revealjs.jit.su:80' url: 'revealjs.jit.su:80'
}
}, },
// Optional libraries used to extend on reveal.js // Optional libraries used to extend on reveal.js

View File

@ -160,9 +160,6 @@ var Reveal = (function(){
// Copy options over to our config object // Copy options over to our config object
extend( config, options ); extend( config, options );
// Push up globals
window.globals = config.globals;
// Hide the address bar in mobile browsers // Hide the address bar in mobile browsers
hideAddressBar(); hideAddressBar();
@ -2031,6 +2028,11 @@ var Reveal = (function(){
return scale; return scale;
}, },
// Returns the current configuration object
getConfig: function() {
return config;
},
// Helper method, retrieves query string as a key/value hash // Helper method, retrieves query string as a key/value hash
getQueryHash: function() { getQueryHash: function() {
var query = {}; var query = {};

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
(function() { (function() {
var multiplex = window.globals.multiplex; var multiplex = Reveal.getConfig().multiplex;
var socketId = multiplex.id; var socketId = multiplex.id;
var socket = io.connect(multiplex.url); var socket = io.connect(multiplex.url);

View File

@ -1,7 +1,7 @@
(function() { (function() {
// don't emit events from inside the previews themselves // don't emit events from inside the previews themselves
if ( window.location.search.match( /receiver/gi ) ) { return; } if ( window.location.search.match( /receiver/gi ) ) { return; }
var multiplex = window.globals.multiplex; var multiplex = Reveal.getConfig().multiplex;
var socket = io.connect(multiplex.url); var socket = io.connect(multiplex.url);