Pass snapshot formats as requirejs config rather than globally
[gitphp.git] / js / modules / tooltip.snapshot.js
blob:a/js/modules/tooltip.snapshot.js -> blob:b/js/modules/tooltip.snapshot.js
--- a/js/modules/tooltip.snapshot.js
+++ b/js/modules/tooltip.snapshot.js
@@ -9,13 +9,12 @@
  * @subpackage Javascript
  */
 
-define(["jquery"],
-	function($) {
+define(["jquery", 'modules/snapshotformats'],
+	function($, formats) {
 		
 		function buildTipContent(href) {
 			var content = '<div>' + GitPHP.Resources.Snapshot + ': ';
 			var first = true;
-			var formats = GitPHP.Snapshot.Formats
 			var cleanurl = href.indexOf('/snapshot') != -1;
 			for (var type in formats) {
 				if (formats.hasOwnProperty(type)) {

comments