Forums

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

Close current tab/window with macro

Guillaume Lorquet (OLD) June 3, 2020

Hi,

I would like to know if it exists a way to use a macro to close actual tab/window.

Scenario :

  1. I'm on a Confluence page,
  2. I would like to close it with a clickable big red button (for example),
  3. Actual tab/page is closed.

It's a kind of "Accessibility" improvement.

Thx

1 answer

0 votes
repi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2020

@Guillaume Lorquet (OLD) 

The simplest user macro would be this code:

## @noparams
<button onClick="self.close();">page close</button>

The button can be assigned corresponding attributes such as size and color in the html code.

But only works if page / tab have no history.

Guillaume Lorquet (OLD) June 3, 2020

@repi so, it won't work here.

Goal is to use it on any page. With or without history.

I tried and it doesn't work.

repi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2020

It works in googl-chrome and in opera. Not in the ff.
I do not use microsoft browser!
As I said, only for pages that were opened with the option "in the new tab / page".
It is not for a productive environment.
Why not just press the close button of the tab or the browser.

Guillaume Lorquet (OLD) June 3, 2020

Thx for your reply.

I said the same but users have accessibility issues with mobile platform and they need something big on the page to click on it. It's why I need something customizable and accessible.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events