Skip to content

Commit

Permalink
Commented company replacement and fixed null che ck
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyPancake committed Apr 15, 2024
1 parent 6a3ea4e commit f39ae54
Showing 1 changed file with 39 additions and 36 deletions.
75 changes: 39 additions & 36 deletions amelie/style/static/js/cb.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,40 +87,42 @@ let popupSettings = [
},
runPopupOnce: true
},
{
url: 'companies',
specialMessage: "Wow, you actually visited this page?",
minTime: 1,
maxTime: 5,
specialFunction: () => {
const funnyCompanyMap = {
'Booking.com': 'Pooping.com',
'Belastingdienst': 'Roverheid',
'Voortman Steel Group': 'Voortman Plastic Guys',
'Technolution': 'NoSolution',
'Adlink': 'Adtlink',
'ASML': 'ASSUML',
'Baker Tilly': 'Bakery Tillery',
'Booking Experts': 'Pooping Experts',
'ChipSoft': 'ChipsHard',
'Deloitte': 'TheLottery',
'El Nino': 'El Niño',
'Extendas': 'Extend Das',
'EY': 'HEY!',
'Nedap': 'Nee, dab',
'OVSoftware': 'Oh nee, software!'
};

for (const [key, value] of Object.entries(funnyCompanyMap)) {
const contentText = $("#content").html();
if (contentText.includes(key)) {
let newText = contentText.replace(key, value);
$("#content").html(newText)
}
}
},
runPopupOnce: true
},

// Optional; uncomment with caution
// {
// url: 'companies',
// specialMessage: "Wow, you actually visited this page?",
// minTime: 1,
// maxTime: 5,
// specialFunction: () => {
// const funnyCompanyMap = {
// 'Booking.com': 'Pooping.com',
// 'Belastingdienst': 'Roverheid',
// 'Voortman Steel Group': 'Voortman Plastic Guys',
// 'Technolution': 'NoSolution',
// 'Adlink': 'Adtlink',
// 'ASML': 'ASSUML',
// 'Baker Tilly': 'Bakery Tillery',
// 'Booking Experts': 'Pooping Experts',
// 'ChipSoft': 'ChipsHard',
// 'Deloitte': 'TheLottery',
// 'El Nino': 'El Niño',
// 'Extendas': 'Extend Das',
// 'EY': 'HEY!',
// 'Nedap': 'Nee, dab',
// 'OVSoftware': 'Oh nee, software!'
// };

// for (const [key, value] of Object.entries(funnyCompanyMap)) {
// const contentText = $("#content").html();
// if (contentText.includes(key)) {
// let newText = contentText.replace(key, value);
// $("#content").html(newText)
// }
// }
// },
// runPopupOnce: true
// },
{
url: 'claudia',
specialMessage: "Heyhey, this page is dangerous! Only for (capable) members, like SysCom!",
Expand Down Expand Up @@ -177,11 +179,12 @@ $(() => {
// an extra init async function :/

popupSetting = getPopupSetting();
popupSetting.specialFunction();


if (popupSetting == null) {
return // Stop modal-ing
}

popupSetting.specialFunction();

initAsync();
})

0 comments on commit f39ae54

Please sign in to comment.