Reviewing my Atlassian Confluence profile within our enterprise install, I see a lot of detritus out there. Years worth of watched pages, watched spaces, Save for Later, and Drafts. Looking for a solution to any of it, I found code from 2014 on this page from a deleted user: https://community.atlassian.com/t5/Confluence-questions/Bulk-Unwatch-pages/qaq-p/248164
That idea was the nudge I needed to help me create additional derivative snippets, and package it all together in one post, in hopes of helping others.
Environment:
All snippets were successfully ran on Atlassian Confluence 7.4 Enterprise
Tools:
Your browser's Developer Tools console
Directions:
What each code does:
The code uses the class of the hyperlink to click matching links for the user, and then a reload of the page, which displays the next page of items. Note that the number of pages is now reduced by one.
It is not a one-click solution, but it is much faster than clicking one at a time. >10k items that were out there for years, were cleaned up in minutes. Good luck!
Disclaimer:
Mostly likely you have no reason to trust me or my writing (or anyone else's writing, etc.). So don't. Don't use these code snippets or any code anywhere if you don't understand it. If you use it, it's on you. Test. YMMV.
$(function(){
$('.link-stop-watching').click();
setTimeout(function(){location.reload();},2000);
});
$(function(){
$('.aui-iconfont-star-filled').click();
setTimeout(function(){location.reload();},2000);
});
$(function(){
$('.discard-draft-link').click();
setTimeout(function(){location.reload();},2000);
});
If anyone can level this up, PLEASE DO! Improvements, alternatives, etc., are welcome!
Here is a leveled-up version, as requested. 😄
https://community.atlassian.com/t5/Confluence-questions/Re-Stop-watching-all-the-pages-in-space/qaq-p/2613904/comment-id/292404#M292404
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.