Partage
  • Partager sur Facebook
  • Partager sur Twitter

script lighting

    5 juillet 2019 à 18:21:22

    Bonjour

    j'esseye desesperement de faire fonctionner un script mais sans succes.

    si quelqu'un peut m aider ça serais sympas, ce script n'est pas de moi j'esseye juste de l'adapter

    ce script a pour but d'assombrire une page web sauf les jeux qui sont en flash

    j'ai reussi a le faire fonctionner mais il assombris toute la page meme les jeux

    je ne connais pas grand chose en java script

    voici le script

    function arcade_backlight(act)
    	{
    	if (arcadeGEBI('arcade_turnoff', true)) {
                var m = (arcadeGEBI('arcade_turnoff').style.visibility == 'hidden') ? true : false;
                var s = (m) ? '_on' : '_off';
               arcadeSetAtt('arcade_lightbulb', 'src', arcadeGEBI('arcade_lightbulb').src.replace(s, ((m) ? '_off' : '_on')));
               arcadeSetAtt('arcade_lightbulb', 'title', arcade_lang['BACKLIGHT_ON'+ s]);
                arcadeSetAtt('arcade_turnoff', 'style', 'visibility: ' + ((m) ? 'visible' : 'hidden') + ';');
                (m) ?arcadeSetAtt('gamename', 'style', 'color: white;'): arcadeRemAtt('gamename', 'style');
                if (act !== 'ignore') {
                    (m) ? CreateCookie('lighting', 1, 365): RemoveCookie('lighting');
                   ImgStyle(((m) ? 'light' : 'dark'));
                }
                window.location = '#' + gametop;
            }
        }
    j'ai aussi ésseyer cette façon : 
    function arcade_backlight()
    	{
    		if (arcadeGEBI('arcade_turnoff') != null)
    		{
    			if (arcadeGEBI('arcade_turnoff').style.visibility == 'hidden')
    			{
    				createCookie('arcade_lighting', 1, 365);
    				arcadeSetAtt('arcade_lightbulb', 'src', arcadeGEBI('arcade_lightbulb').src.replace('_on', '_off'));
    				arcadeSetAtt('arcade_lightbulb', 'title', arcade_lang['BACKLIGHT_ON']);
    				arcadeSetAtt('arcade_turnoff', 'style', 'visibility: visible;');
    				arcadeSetAtt('gamename', 'style', 'color: white;');
    			}
    			else
    			{
    				createCookie('arcade_lighting', 0, -1);
    				arcadeSetAtt('arcade_lightbulb', 'src', arcadeGEBI('arcade_lightbulb').src.replace('_off', '_on'));
    				arcadeSetAtt('arcade_lightbulb', 'title', arcade_lang['BACKLIGHT_OFF']);
    				arcadeSetAtt('arcade_turnoff', 'style', 'visibility: hidden;');
    				arcadeGEBI('gamename').removeAttribute('style');
    			}
    		}
    
    		window.location = '#' + gametop;
    	}
     qui est appeler par ce script:
    <script type="text/javascript">
    		// <![CDATA[
    			readCookie(arcade_lighting)
    			{
    				onload_functions.push('arcade_backlight()');
    			}
    		// ]]>
    	</script>
    voila si quelqu un peut m'aider merci si il vous faut d'autre info dite le moi
    merci



    • Partager sur Facebook
    • Partager sur Twitter
      5 juillet 2019 à 23:47:11

      Bonsoir.

      Tu ne nous donnes ni la fonction arcadeGEBI, ni la fonction arcadeSetAtt, je vois donc mal comment nous pourrions t'aider sans le code dont dépend celui que tu nous montres.

      • Partager sur Facebook
      • Partager sur Twitter

      Face a quelqu'un pour qui l'on n'éprouve que de l'aversion et du mépris, les yeux d'un homme deviennent extrêmement froids et cruels.

      script lighting

      × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
      × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
      • Editeur
      • Markdown