Commit efa92fd9 authored by antoor's avatar antoor

Adjust and optimize the code

调整优化代码
parent dbc541f5
...@@ -14,25 +14,27 @@ ...@@ -14,25 +14,27 @@
(function( global, factory ) { (function( global, factory ) {
if ( typeof module === "object" && typeof module.exports === "object" ) { // 不使用module加载器,这样就可以直接在electron中引用jquery了
// For CommonJS and CommonJS-like environments where a proper `window` factory(global);
// is present, execute the factory and get jQuery. // if ( typeof module === "object" && typeof module.exports === "object" ) {
// For environments that do not have a `window` with a `document` // // For CommonJS and CommonJS-like environments where a proper `window`
// (such as Node.js), expose a factory as module.exports. // // is present, execute the factory and get jQuery.
// This accentuates the need for the creation of a real `window`. // // For environments that do not have a `window` with a `document`
// e.g. var jQuery = require("jquery")(window); // // (such as Node.js), expose a factory as module.exports.
// See ticket #14549 for more info. // // This accentuates the need for the creation of a real `window`.
module.exports = global.document ? // // e.g. var jQuery = require("jquery")(window);
factory( global, true ) : // // See ticket #14549 for more info.
function( w ) { // module.exports = global.document ?
if ( !w.document ) { // factory( global, true ) :
throw new Error( "jQuery requires a window with a document" ); // function( w ) {
} // if ( !w.document ) {
return factory( w ); // throw new Error( "jQuery requires a window with a document" );
}; // }
} else { // return factory( w );
factory( global ); // };
} // } else {
// factory( global );
// }
// Pass this if window is not defined yet // Pass this if window is not defined yet
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { }(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>AntSword</title> <title>AntSword</title>
<link rel="stylesheet" href="../static/css/index.css"/> <link rel="stylesheet" href="ant-static://css/index.css"/>
<script>require('../source/load.entry');</script> <script src="ant-src://load.entry.js"></script>
</head> </head>
<body> <body>
<div id="loading"></div> <div id="loading"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment