Skip to content

Instantly share code, notes, and snippets.

@CodeBrauer
Created June 27, 2023 10:27
Show Gist options
  • Save CodeBrauer/26ae9920ceba6c580199d609000ca208 to your computer and use it in GitHub Desktop.
Save CodeBrauer/26ae9920ceba6c580199d609000ca208 to your computer and use it in GitHub Desktop.
Lieferando Foodtrack time left in tab/document title
// ==UserScript==
// @name Lieferando show foodtracker time left in tab title
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds a sprinkle of excitement to your food tracking experience on Lieferando by displaying the remaining time in the tab title. Never lose track of your eagerly awaited meal again!
// @author CodeBrauer
// @match https://www.lieferando.de/foodtracker/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=lieferando.de
// @grant none
// ==/UserScript==
(function() {
'use strict';
function loadData(){
var title = "";
var n = document.querySelectorAll('#scoober-tracker svg tspan');
if(n.length) title += n[0].innerHTML + "min";
var t = document.querySelectorAll('#scoober-tracker h1');
if(t.length){
if(title!="") title += " - ";
title += t[1].innerText;
}
if(title!="") document.title = "🛵 " + title;
}
setInterval(loadData,10*1000);
loadData();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment