Since accessing the internet (and sometimes even the Web) is often a part of an IT job, the "one thing" approach is pretty helpful. Keep in mind what are you doing. If you're reviewing a pull request, you only need the Github page, and not the rest of the pages on the WWW.
Also, timeboxing things helps. It's hard to work on one thing indefinitely, it can even induce panic. But if you're using something like the pomodoro technique, you know that when you're feeling a craving to switch, you have, say, 27 minutes left until the next break. It's observable and manageable; you can concentrate during this time, knowing that a relief is nearing. But the relief (like going for more tea / coffee / etc) is also timeboxed, so you don't get distracted forever.
> If you're reviewing a pull request, you only need the Github page, and not the rest of the pages on the WWW.
In Firefox, you can set browser.tabs.tabMinWidth to a large number in about:config, so that fewer open tabs are visible at once, which may reduce distractions.
Or (slightly more complicated) you can keep a fixed number of tabs visible irrespective of window width, by using userChrome.css to apply a style like `tab:not([pinned=true]) {min-width: calc((100vw - 12em) / 3) !important;}`
Just doing one thing at once, close all your tabs, facebook, and any other time-wasters. Then I set a pomodoro timer for 60min and work until it's done. Currently using Befocused Pro. That is the best way to focus on something that you are procrastinating on.
Also, timeboxing things helps. It's hard to work on one thing indefinitely, it can even induce panic. But if you're using something like the pomodoro technique, you know that when you're feeling a craving to switch, you have, say, 27 minutes left until the next break. It's observable and manageable; you can concentrate during this time, knowing that a relief is nearing. But the relief (like going for more tea / coffee / etc) is also timeboxed, so you don't get distracted forever.