index.js 501 B

123456789101112131415
  1. define(["require"], function (require) {
  2. return {
  3. pageUrl: function () {
  4. var a = document.createElement("a");
  5. a.href = require.toUrl("..");
  6. return require.toUrl('./index.html') + "#" + encodeURIComponent(a.href);
  7. },
  8. popup: function () {
  9. window.open(this.pageUrl(), undefined, "menubar=no, width=1000, height=600");
  10. },
  11. go: function () {
  12. window.location.href = this.pageUrl();
  13. }
  14. };
  15. });