Greasy Fork is available in English.

Show Image Popup Library

Библиотека функций PopupImage

אין להתקין סקריפט זה ישירות. זוהי ספריה עבור סקריפטים אחרים // @require https://update.greasyfork.org/scripts/4524/14909/Show%20Image%20Popup%20Library.js

// ==UserScript==
// @name Show Image Popup Library
// @namespace PSVScripts
// @description Библиотека функций PopupImage
// @version 0.0.0.5
// ==/UserScript==

/*
  handler =  function(SourceObject, CallBack, ImageUrl)
  { 
    ~CallBack(SourceObject, ImageUrl);
    if CanHandle
      return true;
    else
      return false
  }
*/

var win = unsafewindow;

if (!win.PSVScript_IPHandlers)
  win.PSVScript_IPHandlers = new Array();

var handlers = win.PSVScript_IPHandlers;

if (!win.PSVScript_IPHandler)
  win.PSVScript_IPHandler = PSVScript_IPHandler;

function PSVScript_IPHandler(SourceObject, CB, ImageUrl)
{
  for (var i=0; i< handlers.length; i++)
  if (handlers[i](SourceObject, CB, ImageUrl))
    break;
}