Skip to content

Instantly share code, notes, and snippets.

@szepeviktor
Last active June 24, 2019 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szepeviktor/8948e313bde4555efa76c1235370666e to your computer and use it in GitHub Desktop.
Save szepeviktor/8948e313bde4555efa76c1235370666e to your computer and use it in GitHub Desktop.
Wolt vega - az étlap oldalakról eltávolítja a húsételeket - remove meat from the menu
// ==UserScript==
// @name Wolt vega
// @description Az étlap oldalakról eltávolítja a húsételeket.
// @icon https://static.wolt.com/favicon.ico
// @version 0.2.0
// @grant none
// @run-at document-idle
// @include https://wolt.com/*/*/*/restaurant/*
// ==/UserScript==
function _wolt_vega($) {
var vega = ['hús','sertés','vaddisznó','csirke','csirké','Csirke','jérce','pulyka','borjú','marha','kacsa',
' rák ','rákkal','halfilé','harcsa','ponty','tonhal','tintahal','lazac','szardella','tenger gyümölcs','koktélrák','garnélarák','tigrisrák','királyrák',
'kolbász','virsli','hurka','sonka','sonká','karaj','bélszín','tarja','csülök','steak','cordon bleu','pacal','borzaska','prosciutto','bolognai ragu','szűzpecsenye'];
vega.forEach(function (item) {
$('.MenuItem__name___2vhWo:contains("' + item + '")').parents('.MenuItem__itemContainer___H9NYB').remove();
$('.MenuItem__description___3nCOS:contains("' + item + '")').parents('.MenuItem__itemContainer___H9NYB').remove();
});
}
(function (d) {
// Load jQuery
var s = d.createElement("script");
var p = d.getElementsByTagName("script")[0];
s.src = "https://code.jquery.com/jquery-3.4.0.slim.min.js";
p.parentNode.insertBefore(s, p);
// Start remove process
var timer = setInterval(function () {
if (typeof unsafeWindow.jQuery !== "function" || d.querySelectorAll(".MenuItem__name___2vhWo").length === 0) {
return;
}
clearInterval(timer);
_wolt_vega(unsafeWindow.jQuery);
}, 1000);
}(document));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment