wenn ich die entscheidende zeile:
window.document.all.innerHTML = '<html><head><title>Bild<\/title><script type="text\/javascript"> var fit_modes = ["cursor:move;display:block; margin:auto auto", "display:block;max-width:100%;max-height:100%;margin:0 auto;padding:0;cursor:move", "display:block;width:100%;height:auto;margin:0 auto;padding:0;cursor:e-resize", "display:block;width:auto;height:100%;margin:0 auto;padding:0;cursor:s-resize;" ]; var nr=0; function change(nrn){nr = nrn;document.images[0].style = fit_modes[nrn];}<\/script><\/head><body><a href="java script:change((nr+1)%4)" ><img src="'+document.images[0].src+'" style="cursor:move;display:block; margin:auto auto" alt="zoff"><\/a><\/body><\/html>';
wohlgemerkt unter opera mit "javascript"-protokoll starte funktioniert es einwandfrei
aber das untenstehende User.js läuft nicht und wirft bei mir auch keine Fehler aus.
bitte helft mir: "was läuft hier falsch?"
// ==UserScript==
// @name Autosizer
// @author Arve Bersvendsen (edited by fineliner)
// @namespace http://virtuelvis.com/
// @version 1.0.2
// @description Enhance image viewing in Opera by adding five
// different sizing modes to images: "Original",
// "Shrink to Fit", "Maximize", "Fit to Width" and
// "Fit to Height".
// @ujs:category browser: enhancements
// @ujs:published 2005-10-22 20:25
// @ujs:modified 2007-01-15 23:53
// @ujs:documentation http://userjs.org/scripts/browser/enhancements/autosizer
// @ujs:download http://userjs.org/scripts/download/browser/enhancements/autosizer.js
// ==/UserScript==
if ((window.location.href.match(/^.*\.(jpe?g|bmp|gif|png)$/i)) && (document.images.length==1) && document.body.childNodes.length == 1)
{
window.document.all.innerHTML = '<html><head><title>Bild<\/title><script type="text\/javascript"> var fit_modes = ["cursor:move;display:block; margin:auto auto", "display:block;max-width:100%;max-height:100%;margin:0 auto;padding:0;cursor:move", "display:block;width:100%;height:auto;margin:0 auto;padding:0;cursor:e-resize", "display:block;width:auto;height:100%;margin:0 auto;padding:0;cursor:s-resize;" ]; var nr=0; function change(nrn){nr = nrn;document.images[0].style = fit_modes[nrn];}<\/script><\/head><body><a href="java script:change((nr+1)%4)" ><img src="'+document.images[0].src+'" style="cursor:move;display:block; margin:auto auto" alt="zoff"><\/a><\/body><\/html>';
}

Hilfe
Neues Thema
Antworten

Nach oben


