Получение Firefox, чтобы изменить "Домашнюю страницу" в зависимости от дня недели

294
nearmint

Думаю, это странный вопрос, но мне бы хотелось, чтобы именно то, что я написал в названии. Я хочу использовать разные «домашние страницы» или «стартовые страницы» в Firefox в зависимости от дня недели, когда браузер запускается.

Например, 5 дней недели начальная страница будет URL-адресом A. Но 2 дня недели начальная страница будет URL-адресом B.

Я думаю, что таким образом URL B не будет мешать мне, но я все равно заставлю себя чаще посещать URL B.

Какие-либо предложения?

Я прибегнул к поиску расширения Firefox, чтобы использовать это, но нашел только «Homeizer Randomizer» ( https://addons.mozilla.org/en-us/firefox/addon/homepage-randomizer/ ), который находится в правильное направление, поскольку вы можете указать несколько URL-адресов домашней страницы, но URL-адрес, который используется в данный момент времени, зависит от случайного появления. Это не так хорошо. Также расширение устарело ...

0

2 ответа на вопрос

1
Caleb Xu

Some searches showed that the addon you mentioned and other similar, outdated extensions. I think your best shot is to place a PHP script somewhere on your local computer (or on a remote server, if you wish), that get's the job done of finding the day of week, and redirecting the browser to a page accordingly. You may find some help in making such a script with the guide on date at http://www.php.net/manual/en/function.date.php. Set your browser homepage to this PHP script. By checking the current day of week and comparing with if...then statements, you can redirect to another page (your actual desired homepage accordingly). I realize there is a bit of a lag between you're browser reaching the PHP script and then redirecting to the respective site, but that's about all I can do for now.

1
Eric B

You could use JavaScript to make a simple script that gets the day of the week using the Date.getDay function, and then redirects accordingly. You can then place the script in an HTML file on your local computer and set your Firefox homepage to it. This way, you don't have to rely on an external server and the redirection should be almost instantaneous.