-
Notifications
You must be signed in to change notification settings - Fork 12
/
header navigation mindbody login or register links add.html
85 lines (43 loc) · 1.99 KB
/
header navigation mindbody login or register links add.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<script>
$( ( ) => {
/*
header navigation mindbody login or register links add
License : < http://tinyurl.com/bdhte7xp >
Version : 0.2.0
SS Version : 7.1
Dependencies : jQuery
Note : mindbody generated the script and healcode-widget tags
By : Thomas Creedon < http://www.tomsWeb.consulting/ >
*/
const dataSiteId = '[enter data site id here replacing square brackets]';
const dataMbSiteId = '[enter data mb site id here replacing square brackets]';
// do not change anything below, there be the borg here
const title = 'Header Navigation Mindbody Login or Register Links Add';
const version = '0.2.0';
const s = `${ title } v${ version }, ` +
'License < http://tinyurl.com/bdhte7xp >, ' +
'Tom\'s Web Consulting < http://www.tomsWeb.consulting >';
console.log ( s );
const b = window.HealcodeWidget === undefined;
let html = '<script src="https://widgets.mindbodyonline.com/javascripts/healcode.js" type="text/javascript"><\/script>';
if ( b )
$( html ).appendTo ( 'head' )
html = `
<healcode-widget
data-version="0.2"
data-link-class="loginRegister"
data-site-id="${ dataSiteId }"
data-mb-site-id="${ dataMbSiteId }"
data-type="account-link"
data-inner-html="Login | Register"
/>
`;
$( html )
.appendTo ( '.header-nav-list' )
.addClass ( 'header-nav-item header-nav-item--collection header-nav-item--active' )
.attr ( 'data-animation-role', 'header-element' );
$( html )
.appendTo ( '.header-menu-nav-folder-content' )
.addClass ( 'container header-menu-nav-item header-menu-nav-item--collection' );
} );
</script>