Option for URLs to open in current tab (or teach me a little javascript)

I sometimes use URLs to control external applications. For example, the app Keyboard Maestro can create macros triggered by local URLs. It would be really cool if I could use Dynalist to save and organize macro triggers that can be clicked and simply to what I want without opening a new tab each time.

I am trying to solve it myself by creating a Chrome extension that solves the probelm, but Iā€™m new to this so Iā€™m having a little trouble. I managed to make a script that removes the ā€œtargetā€ attribute from all the HTML elements for links, and it workedā€¦ almost. I was able to make links open in the current tab, but once I edited my document Dynalist updated and ā€œtarget=_blankā€ attributes got added again and links again started opening in new tabs.

Is there a simple way to make a javascript event handler that will run each time Dynalist updates?

Or can we just have an option to make links open in the current tab?

1 Like

Just run your script every 5 seconds I guess?

Weā€™d prefer not to bloat the options with a niche use case but will definitely consider it if more people brings this up!

1 Like

That is fair. I just published the Chrome extension, and Iā€™m about to make a post about it.

no need for this

chrome already does this basic thing

do you not use ctrl click to open links in new tabs?

oh dyna opens in ā€˜newā€™ tab by default, want ā€˜currentā€™ tab

well why would you want links to open in ā€˜currentā€™ tab for?

are you on mobile or something?

I explained that in my original post:

1 Like