Add an Edit Topic button to topic pages

If I have access to edit the topic, there should be an Edit Topic button the page, the same way there's an Edit Bulletin Board button on the Bulletin Board.

It is a long pathway out of a topic, finding it on the topics page again, and clicking the edit button on it to get to the edit view of that same topic that I was just in.

I noticed that the key difference is just the URL. So I started just changing the topic URL to get to edit mode.

Then I made myself a bookmarklet to do it:

javascript:(() %3D> %7B const a %3D document.location.href%3B if (a.match(/.*%23topicdetail%5C/.*%5C/0%5C/0/)) %7B document.location.href %3D a.replace(/(.*)%23topicdetail(%5C/.*)%5C/0/,%27%241%23topicdetailedit%242%27)%3B %7D else if (a.match(/(.*)%23topicdetailedit(%5C/.*)/)) %7B document.location.href %3D a.replace(/(.*)%23topicdetailedit(%5C/.*)/, %27%241%23topicdetail%242/0%27)%3B %7D else %7B alert(%27Not on a MyGroton topic page!%27)%3B %7D%7D)()%3B
  • Seth Battis
  • Jun 24 2022
  • Attach files