Is it possible to turn safari javascript on/off with shortcut?

I find the process for turning javascript off and on for Safari to be a bit laborious. Seems like a perfect thing to create a shortcut for…except I can’t figure it out. Maybe it’s just not possible?

I don’t think that would be possible using just Shortcuts.

I might ask, why do you want to disable JavaScript? A very large proportion of the web utilises JavaScript (~98% based on Wikipedia’s JavaScript page), and it is why many of the “no script” browser plugins have generally fallen out of favour. You have to enable JavaScript for pretty much every mainstream web site to make it usable. But, in case it helps, the No Script plugin does have a recent request in for Safari extension support - that might be worth keeping an eye on if you really need to disable scripting.