浏览代码

Bye bye view-source: links.

Mr.doob 8 年之前
父节点
当前提交
b932ba1a1b
共有 1 个文件被更改,包括 1 次插入11 次删除
  1. 1 11
      examples/index.html

+ 1 - 11
examples/index.html

@@ -282,17 +282,7 @@
 		button.textContent = 'View source';
 		button.addEventListener( 'click', function ( event ) {
 
-			try {
-
-				var url = location.href.split( '/' ).slice( 0, - 1 ).join( '/' );
-				window.open( 'view-source:' + url + '/' + selected + '.html' );
-
-			} catch ( e ) {
-
-				window.open( 'https://github.com/mrdoob/three.js/blob/master/examples/' + selected + '.html' );
-				console.log( e );
-
-			}
+			window.open( 'https://github.com/mrdoob/three.js/blob/master/examples/' + selected + '.html' );
 
 		}, false );
 		button.style.display = 'none';