seb92kl / Marchand_06022016

// ==UserScript==
// @id           Marchand_06022016
// @name         Marchand_06022016
// @namespace    aaa
// @version      0.1
// @description  Schleife, bis jQuery geladen wurde / danach wird die Funktion fn_start ausgefuehrt
// @author       Se Kl
// @icon         https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTf0UnJ9mqyjuAJTOk8pCs9-mJG94aNrf1lmKxvViy9jduVnPIk
// @match        http://uni4.xorbit.de/*
// @grant        none
// @run-at       document-end
// ==/UserScript==



'use strict';


(function() {
    console.debug( 'URL: ' + document.location.href );
    setTimeout(check_jQuery, 0);
})();

function check_jQuery() {
        console.debug( 'check_jQuery' );
    if ( typeof(jQuery) === 'undefined' ) { 
        console.log( 'if ' + document.location.href );
        setTimeout( check_jQuery, 25 )
    } else {
        console.log( 'else ' + document.location.href );
        fn_start()
    }
}


function fn_start() {
    // console.debug( '##################################### \n URL:' + document.location.href + '\n' + jQuery + '\n\n' + jQuery('html')[0].innerHTML + '\n------------------------------------- \n' );
    alert('start');
}