[LIBRARY] InjectorLib

Contains several functions for injecting html/js/css

Bu script direkt olarak kurulamaz. Başka scriptler için bir kütüphanedir ve meta yönergeleri içerir // @require https://update.greasyfork.org/scripts/40894/266335/%5BLIBRARY%5D%20InjectorLib.js

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         [LIBRARY] InjectorLib
// @namespace    http://thebone.ml/tampermonkey
// @version      1.0
// @updateURL    http://thebone.ml/tampermonkey/ressource
// @downloadURL  http://thebone.ml/tampermonkey/
// @description  Contains several functions for injecting html/js/css
// @author       TheBone
// ==/UserScript==

function inject_srcjs(link) {
  $('<script type="text/javascript" src="' + link + '"/>').appendTo($('head'));
}
function inject_rawjs(jsstring) {
  $('<script type="text/javascript">' + jsstring + '</string>').appendTo($('head'));
}
function inject_headhtml(htmlstring) {
  $(htmlstring).appendTo($('head'));
}
function inject_bodyhtml(htmlstring) {
  $(htmlstring).appendTo($('body'));
}
function inject_customhtml(htmlstring, appendto) {
  $(htmlstring).appendTo($(appendto));
}
function inject_globalcss(css) {
  var head, style;
  head = document.getElementsByTagName('head')[0];
  if (!head) {
    return;
  }
  style = document.createElement('style');
  style.type = 'text/css';
  style.innerHTML = css;
  head.appendChild(style);
}