Przeglądaj źródła

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

Hakim El Hattab 11 lat temu
rodzic
commit
825fe51de9
5 zmienionych plików z 14 dodań i 13 usunięć
  1. 6 7
      index.html
  2. 5 3
      js/reveal.js
  3. 1 1
      js/reveal.min.js
  4. 1 1
      plugin/multiplex/client.js
  5. 1 1
      plugin/multiplex/master.js

+ 6 - 7
index.html

@@ -358,13 +358,12 @@ function linkify( selector ) {
 
 				theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
 				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
-					multiplex: {
-						id: '7d10234555b923e2',
-						secret: '13627859051503309760',
-						url: 'revealjs.jit.su:80'
-					}
+
+				// Generate a unique id and secret at http://revealjs.jit.su/token
+				multiplex: {
+					id: '',
+					secret: '',
+					url: 'revealjs.jit.su:80'
 				},
 
 				// Optional libraries used to extend on reveal.js

+ 5 - 3
js/reveal.js

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

Plik diff jest za duży
+ 1 - 1
js/reveal.min.js


+ 1 - 1
plugin/multiplex/client.js

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

+ 1 - 1
plugin/multiplex/master.js

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

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików