-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcapc account settings link.html
97 lines (50 loc) · 1.96 KB
/
capc account settings link.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
86
87
88
89
90
91
92
93
94
95
96
97
<!--
begin capc account settings link
License : < https://tinyurl.com/s872fb68 >
Version : 0.1.2
SS Versions : 7.1, 7.0
Fluid
Engine
Compatible : Not Applicable
Dependencies : customer account panel change < https://tinyurl.com/2mhtu4wm >
Copyright : 2024 Thomas Creedon
Tom's Web Consulting < http://www.tomsWeb.consulting/ >
-->
<script>
// initialize twc module
var twc = ( ( self ) => self ) ( twc || { } );
twc.casl = {
url : '[ enter url here between single quotes replacing square brakets ]'
};
</script>
<!-- do not change anything below, there be the borg here -->
<script>
( ( ) => {
const
version = '0.1.2',
s = `CAPC Account Settings Link v${ version }
License < https://tinyurl.com/s872fb68 >
© 2024 Thomas Creedon
Tom's Web Consulting < http://www.tomsWeb.consulting >`
.replace ( /^\s+/gm, '' );
console.log ( s );
} ) ( );
// initialize twc capc sub-module
twc.capc = ( ( self ) => self ) ( twc.capc || { } );
// initialize twc capc callbacks sub-module
twc.capc.callbacks = ( ( self ) => {
const callback = ( dcmnt, panelType ) => {
// bail if not digital products
if ( panelType != 'digital products' ) return;
const
url = twc.casl.url,
selector = '.twc-capc-account-settings a';
dcmnt
.querySelector ( selector )
.setAttribute ( 'href', url );
};
self.push ( callback );
return self;
} ) ( twc.capc.callbacks || [ ] );
</script>
<!-- end capc account settings link -->