Is there a way to create a program that reads from data on the screen then adds the list of visited websites into a file?
If what you mean is read the text that appears in the user's browser and save it as a string or variable, yes. There are different methods for achieving this depending on which programming language you're using:
- In Python, using BeautifulSoup
```python
import requests
from bs4 import BeautifulSoup

# Make a request to www.example.com
url = "https://www.example.com"
response = requests.get(url)
soup = BeautifulSoup(response.content, "html.parser")
print(soup.get_text()) # prints the whole page content including ads etc

```
- In JavaScript, using Puppeteer (a library by Google for automating web browsers)
```js
const puppeteer = require("puppeteer");

// Open a webpage
const page = await puppeteer.open("http://www.example.com");

// Get all elements with the class "header__link--visited"
const headerLinkVisitedElements = await page.evaluate(() => Array.prototype.filter.call(document.querySelectorAll(".header__link--visited"), element => element!== null));

// Log each link that has been visited
await Promise.all(headerLinkVisitedElements.map(element => {
  console.log(`${element.innerText} was visited`);
}));
```
Note that it may be necessary to use an ad blocker or disable third party cookies in order to perform this task properly. Additionally, some websites do not respond well to automated scraping, so you should test your code thoroughly before using it in production.