aaslun / Lunchmaestro för norran.se/dagenslunch

// ==UserScript==
// @name         Lunchmaestro för norran.se/dagenslunch
// @version      1.0
// @namespace    http://tampermonkey.net/
// @description  H4ck3r lunch on norran.se. Let Kim Brännlund approve the restaurants (the ones with buffé) and see which ones serves lasagna today.
// @author       Andreas Lundgren
// @match        http://norran.se/dagenslunch
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';

var style = '<style type="text/css">'+
    '.dagens-lunch__item:hover { box-shadow: 0px 0px 20px #f00; }'+
    '.foodicon { width:48px; }'+
    '</style>';

jQuery(style).appendTo(jQuery('head'));

    jQuery('.main-content .grid .grid__item').each(function(key, item) {
        var $item = jQuery(item);
        var $itemBody = $item.find('.body');
        var restaurantName = $item.find('header img').attr('alt');
        
        $itemBody.append('<h3 style="color:red;">'+restaurantName+'</h3>');
        
        jQuery($item.find('.meal')).each(function(key, meal){
            if(meal.innerHTML.search('oppa') > -1) {
                $itemBody.append('<img src="http://icons.iconarchive.com/icons/iconsmind/outline/128/Soup-icon.png" alt="soup" class="foodicon"/>');
            }
            if(meal.innerHTML.search('yckling') > -1) {
                $itemBody.append('<img src="http://cdn.flaticon.com/png/256/35630.png" alt="chicken" class="foodicon"/>');
            }
            if(meal.innerHTML.search('asagne') > -1) {
                $itemBody.append('<img src="http://img1.kochrezepte.at/64x64/1/lasagne-fuer-ungeuebte_1363.jpg" alt="lasagne" class="foodicon"/>');
            }
            if(meal.innerHTML.search('Fisk|fisk|lax|Lax|trömming|Torsk|torsk|sej|ummel|spätta') > -1) {
                $itemBody.append('<img src="http://plainicon.com/dboard/userprod/2921_4eb4c/prod_thumb/plainicon.com-56492-256px-16b.png" alt="fish" class="foodicon"/>');
            }
            if(meal.innerHTML.search('iff|otlett|arré|ött|oxfil|Oxfil|äskfil|fläsk|Fläsk|kink') > -1) {
                $itemBody.append('<img src="http://cdn.flaticon.com/png/256/35625.png" alt="meat" class="foodicon"/>');
            }
            if(meal.innerHTML.search('uffe|uffé') > -1) {
                $itemBody.append('<img src="http://norran.se/wp-content/uploads/annons/brakim.jpg" alt="kim" class="foodicon"/>');
            }

        });

    });