File tree Expand file tree Collapse file tree 1 file changed +41
-1
lines changed
Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change 1818 < a href ="http://discord.carletoncomputersciencesociety.ca "
1919 > {{- partial "button.html" (dict "label" "Discord") -}}</ a
2020 >
21- < a style ="text-decoration: none " href ="/mailing-list ">
21+ < a
22+ style ="text-decoration: none "
23+ data-eo-form-toggle-id ="dd836c44-8774-11f0-9c6d-8b19c0f8937b "
24+ href ="# "
25+ >
2226 < div class ="home-header-discord ">
2327 < div
2428 class ="far fa-bell home-header-discord-arrow small-external-link-arrow "
5660 </ div >
5761 </ div >
5862</ div >
63+ < script >
64+ window . addEventListener ( "load" , ( ) => {
65+ const observer = new MutationObserver ( ( ) => {
66+ const form = document . querySelector ( "form.emailoctopus-form" ) ;
67+ if ( form ) {
68+ observer . disconnect ( ) ;
69+
70+ const emailInput = form . querySelector ( 'input[type="email"]' ) ;
71+ const submitButton = form . querySelector ( 'input[type="submit"]' ) ;
72+
73+ if ( ! emailInput || ! submitButton ) return ;
74+
75+ submitButton . addEventListener ( "click" , ( e ) => {
76+ const email = emailInput . value . trim ( ) ;
77+ if ( / @ c m a i l \. c a r l e t o n \. c a $ / i. test ( email ) ) {
78+ e . preventDefault ( ) ;
79+ alert (
80+ "Sorry, emails from cmail.carleton.ca are not allowed. We already sends emails to all Computer Science students with a cmail address."
81+ ) ;
82+ } else {
83+ alert (
84+ "Thank you for subscribing! You will receive an email to confirm your subscription."
85+ ) ;
86+ }
87+ } ) ;
88+ }
89+ } ) ;
90+
91+ observer . observe ( document . body , { childList : true , subtree : true } ) ;
92+ } ) ;
93+ </ script >
94+ < script
95+ async
96+ src ="https://eocampaign1.com/form/dd836c44-8774-11f0-9c6d-8b19c0f8937b.js "
97+ data-form ="dd836c44-8774-11f0-9c6d-8b19c0f8937b "
98+ > </ script >
You can’t perform that action at this time.
0 commit comments