Block web-page containing a specific word in Safari

Solution 1:

There is an open source extension for Safari named PeyvandhaBlocker to prevent loading an automatic page redirection based on IP (in the URL) and element type. You can get it and modify allowContentToLoad function in global.html file to take decisions based on URL or context of loaded web pages, and then edit the content.js for the block action you need.