deny.ui.js 593 B

123456789101112131415161718
  1. window.locateLogin = function(obj)
  2. {
  3. let $this = $(obj);
  4. $.getJSON($this.data('url'), function(data)
  5. {
  6. if(typeof data.load != 'undefined') top.location.href = data.load;
  7. })
  8. }
  9. window.checkGoBackBtn = function()
  10. {
  11. if(window.top === window) return;
  12. const historyState = top.window.history.state;
  13. const canGoBack = historyState && historyState.prev && historyState.prev.code === $.apps.currentCode;
  14. if(canGoBack) return;
  15. $('.go-back-btn').hide();
  16. $('.close-app-btn').removeClass('hidden').on('click', () => $.apps.closeApp($.apps.currentCode));
  17. };