The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence advertising on public links

Giulio Grassini
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 21, 2024

Is there a way to remove the advertising pop-up in Confluence Cloud for every open link? I’ve tried inserting an HTML/JavaScript macro within the pages, but nothing seems to work or hide it.

confluence_popup.png

The code I tried:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Popup Blocker</title>
<script>
// Function to block popups
function blockPopups() {
var popupInterval = setInterval(function() {
// Check for open windows
var windows = window.open("", "_blank");

// If there's an open window, close it
if (windows) {
windows.close();
alert("Popup blocked!");
}
}, 1000); // Check every second
}

window.onload = function() {
blockPopups(); // Call blockPopups function after page load
};
</script>
</head>
<body>

 

thank you in advance

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
marc -Collabello--Phase Locked-
Community Champion
March 22, 2024

Hi @Giulio Grassini ,

When you insert javascript into a page, it will be escaped (i.e. rendered non-functional) for security reasons.

That means your approach won't work, and I don't know a solution to block the popups within Confluence.

However you might use a browser extension to block the popups.

Giulio Grassini
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 22, 2024

Thank you for the reply Marc! Anyway the problem is limited to unregistered users, the agents doesn't see any pop up after the deactivation of product suggestions, so I'm still loking forward to find a workaroud :)

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events