Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- no code here -->
              
            
!

CSS

              
                /* no code here */
              
            
!

JS

              
                var words = {
  "data": ["Populaire", "Suisse", "Citoyen", "Initiative", "Article", "Pétition", "Pouvoirs", "Politique", "Loi", "Référendum", "Obligatoire", "Peuple", "Revendications", "Démocratie", "Monarchie", "Tirage au sort", "RIC", "Souveraineté", "Constitution", "Révision", "Amendement", "Démocrate", "Constitutionnel", "Législatif", "Autocratie", "Dictature", "Véto", "Oligarchie", "Hiérarchie des normes", "Loi ordinaire", "Loi organique", "Jurisprudence", "Constituant", "Votation", "Alinéa", "CARL", "Abroger", "Ratifier", "Modalités", "Convocation", "Révocation", "Dissolution", "Populisme", "Anarchisme", "jugement majoritaire", "pluralisme", "débat", "quorum", "sondage", "délibération", "consentement", "facilitateur", "intelligence collective", "service public", "Réforme", "cause commune", 
           
           
          "Politicien", "Assemblée nationale", "Sénat", "Élus", "Complotisme", "Gauche", "Droite", "Fascistes", "Gilets jaunes", "Antifa", "Télévision", "Langue de bois", "Promesse", "Union européenne", "Journalistes", "Mondialisme", "mondialisation", "Libre-échange", "Lobby", "Populisme", "Divertissement", "Sécurité ", "Le progrès", "Manifestation", "Grève", "Droit de l’homme", "GUILLOTINE", "bureaucratie", "fonctionnaire", "représentant", "corruption", "union européenne", "traités internationaux", "ennemi", "Journalisme", "Syndicats", "Austérité", "racisme", "Vidéoprotection", "bio", "Acquis sociaux", "bio", "dette", "immigration", "guerre", "précarisation", "mafia", "féminisme", "Frontières",
           
           "vérification des faits", "Esprit critique", "Zététique", "Zététicien", "Scepticisme", "Pragmatisme", "Sophisme", "Factuel", "Fait", "preuve", "vérité", "réalité", "tromperie", "erreur de logique", "erreur de rhétorique", "débat", "Mensonge", "Désinformation", "Argument d’autorité", "Argument de la nouveauté", "Manipulation des probabilités", "Appel aux émotions", "Appel à la terreur", "Appel à la nature", "Appel à la pitié", "Appel au ridicule", "Appel à la tradition", "Appel à l’argent", "Appel à la flatterie", "Appel à la pratique courante", "Preuves anecdotiques", "Erreur du parieur", "Solution parfaite", "Coup de projecteur", "Biais de confirmation", "Faux dilemme", "Mensonge", "Pente savonneuse", "Attaque personnelle", "Charge de la preuve", "Homme de Paille", "Culpabilité par association", "L’erreur sur l’erreur", "Contre-vérité", "Propagande", "Pédagogie", "Programme", "Langue de bois", "infobésité", "novlangue", "Confusion entre cause et effet", "Argument circulaire", "Vœu pieux", "infobésité", "source", "media", "wikipedia", "débat", "mise en scène des conflits", "liberté d’expression", "sondage", "mauvaise foi", "mille feuille argumentatif", "duplicité", "argument", "démonstration", "raisonnement", "présomption", "supposition", "affirmation", "conviction", "témoignage", "doute", "renseignement", "croyance", "certitude", "concordance", "croiser les sources", "objectivité", "théorie",
           
           
          ]
},
  count = words.data.length,
  b = document.getElementsByTagName("BODY")[0],   
  c = document.createElement('h1'),  
  e = document.createElement('p'),
  d = document.createElement('p'),
  bodyStyles = {
    fontFamily : 'Roboto, sans-serif',
    textAlign : 'center',
    background : '#000',
    color : '#fff'
  },  
  styles = {
    boxSizing: "border-box",
    minHeight: "30px",
    minWidth: "300px",
    color: "white",
    fontSize: "24px",
    padding: "12px 12px",
    backgroundColor: "#8BC34A",
    border: "2px solid #009688",
    display: "inline-block",
    textAlign: "center",
    borderRadius: "3px",
    boxShadow: "2px 3px 5px 2px rgba(60, 102, 11, 0.12)",
    cursor: "pointer"
  },
  randomNum = function () { return Math.floor(Math.random() * count)};

// get Roboto font
WebFontConfig = {
  google: { families: [ 'Roboto::latin' ] }
};
(function() {
  var wf = document.createElement('script');
  wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
  wf.type = 'text/javascript';
  wf.async = 'true';
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(wf, s);
})();

d.className = 'lets-make-fun';

for (i in bodyStyles) {
  b.style[i] = bodyStyles[i];
}

for (i in styles) {
  d.style[i] = styles[i];
}

c.style.marginTop = "10px"; 
c.innerHTML = "Cliquez sur le mot pour en générer un nouveau";
d.innerHTML = words.data[randomNum()];
e.innerHTML = "Mot numéro " + randomNum() ;

document.body.insertBefore(c, document.body.childNodes[0]);
document.body.insertBefore(d, document.body.childNodes[1]);
document.body.insertBefore(e, document.body.childNodes[2]);

d.addEventListener("click", function(){
  var newRandomNum = randomNum();  
  d.innerHTML = words.data[newRandomNum];
  e.innerHTML = "Mot numéro " + newRandomNum ;
});

d.addEventListener("mouseenter", function(){
  d.style.backgroundColor = "#84bf40";
});

d.addEventListener("mouseleave", function(){
  d.style.backgroundColor = "#000";
});



              
            
!
999px

Console