PluginProbe
Elementor Website Builder – more than just a page builder / 3.8.0-beta1
Elementor Website Builder – more than just a page builder v3.8.0-beta1
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 All 457 releases
elementor / app / assets / js / hooks / use-action.js

use-action.js in Elementor Website Builder – more than just a page builder 3.8.0-beta1, at app/assets/js/hooks/use-action.js

22 lines 673 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 export default function useAction() {
2 return {
3 backToDashboard: () => {
4 if ( window.top === window ) {
5 window.top.location = elementorAppConfig.admin_url;
6 } else {
7 // Iframe.
8 window.top.$e.run( 'app/close' );
9 }
10 },
11 backToReferrer: () => {
12 if ( window.top === window ) {
13 // Directly - in case that the return_url is the login-page, the target should be the admin-page and not the login-page again.
14 window.top.location = elementorAppConfig.return_url.includes( elementorAppConfig.login_url ) ? elementorAppConfig.admin_url : elementorAppConfig.return_url;
15 } else {
16 // Iframe.
17 window.top.$e.run( 'app/close' );
18 }
19 },
20 };
21 }
22