css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <head>

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  <link href="https://fonts.googleapis.com/css?family=Anton|Kavivanar" rel="stylesheet">
  
</head>

<body id="body" onload="return randomColor()">
  <h3>Meaty Jobo's Meaty Quote Machine</h3>
  <div class="quotainer">
  <div id= "quoteDisplay" class="quoteDisplay">
    <p1>Press 'Give Me The Meat!!' to get you a quote.<p1>
    <!-- Quotes appear in here -->
  </div>
    </br>
    <div id= "authorDisplay" class= "authorDisplay">
      <!--Authors appear here-->
    </div>
  </div>
  <div class = "row">
    <div class = "col-md-4 col-xs-2"></div>
    <div class ="col-md-2 col-xs-3">
  <button class="quoteButton btn btn-block"  id="quoteButton">Give Me The Meat!!</button>
    </div>   
    <div class="col-md-1 col-xs-1"></div>
      <div class= "col-md-2 col-xs-1">
        
        <a id="twitterButton"  class="btn btn-block fa fa-twitter" href="#" target="_blank"></a>
        
</div>
      
  </div>
    <div class="tag">
        <p1>Made by MeatyJobo</p1>
      </div>
</body>
    
            
          
!
            
              h3{
  color:black;
  font-size:3vw;
  font-family: 'Anton', sans-serif;
  font-style: oblique;
  text-align: center;
}

.quotainer{
  background-color:white;
  Padding left: 30vw;
  padding right:30vw;
  width: 60VW;
  margin: auto;
}

.quoteDisplay{
  font-family: 'Kavivanar', cursive;
  font-size: 4vw;
  padding: 2vw 2vw 0vw 2vw;
  text-align: center;
}

.authorDisplay{
  font-family: 'Kavivanar', cursive;
  font-style: italic;
  font-size: 2.5vw;
  padding-bottom:2vw;
  padding-right:3vw;
  text-align: right;
}

.quoteButton{
  font-size:1.75vw;
  margin-top: 1vw;
  width:25vw;
  background-color:white;
  }

.tag{
  font-size:1vw;
  font-family: 'Anton', sans-serif;
  padding-right: 5vw;
  padding-bottom: 2vw;
  padding-top:3vw;
  text-align: right;
}



.fa {
  padding: 1vw;
  font-size: 30px;
  width: 4vw;
  text-align: center;
  text-decoration: none;
  margin-top: 1vw;
}

.fa:hover {
    opacity: 0.7;
  text-decoration: none;
  color: #ddd;
}
.fa:active {
  text-decoration: none;
  color:#fff;
}
.fa:visited{
  text-decoration: none;
  color:#fff;
}

.fa-twitter {
  background: #55ACEE;
  color: white;
  width:50px;
}
            
          
!
            
              //for changing the colors of the background and text.

var colors = [
  '#96beff','#080887','#ba004d','#ff6bf4','#ffd400','#0bef26','#931193','#911122','#689101'
];
function randomColor(){
  var rndColor= Math.floor(Math.random()*colors.length);
  document.getElementById('quoteDisplay').style.color = colors[rndColor];
  document.getElementById('authorDisplay').style.color = colors[rndColor];
  document.getElementById('body').style.background = colors[rndColor];
}

$(document).ready(function(){
//storing the quotes and authors.

var quote = [
  "'Before you ask why someone hates you, ask yourself why you give a f***.'",
  "'C is for Cookie.'",
  "'You miss 100% of the shots you don't take. - Wayne Gretsky'",
  "'Mike Aruba.'",
  "'Uuuuuuuuuuur Ahhhhhhhrrrrr Uhrrrrr Ahhhhhhhhrrrrr Aaaaaaaarhg...'",
  "'The problem with quotes on the internet is that it's hard to verify their authenticity.'",
  "'I don't need to know you, I just need to blow you.'",
  "'Be yourself and be good to people, and the cool people will like you and everyone else can go f*** themselves.'",
  "'I have an intelligence of 6. I know what I'm doing.'",
  "'It'sa me. Mario.'",
  "'Quotes are for dumb people who can't think of something intelligent to say on their own.'",
  "'There's 7 billion, 46 million people on the planet and I have the audacity to think I matter.'",
  "'A woman needs a man like a fish needs a bicycle.'",
  "'NOTHIN IS MORE BADASS THAN TREATING A WOMAN WITH RESPECT!'",
  "'KILL ME PLZ'",
  "'I'm not sad anymore, I'm just tired of this place.'",
  "'Well done. Here come the test results: 'You are a horrible person.' That's what it says: a horrible person. We weren't even testing for that.'",
  "'When life gives you lemons, don’t make lemonade. Make life take the lemons back! Get mad! I don’t want your damn lemons, what the hell am I supposed to do with these? Demand to see life’s manager! Make life rue the day it thought it could give Cave Johnson lemons! Do you know who I am? I’m the man who’s gonna burn your house down! With the lemons! I’m gonna get my engineers to invent a combustible lemon that burns your house down!'",
  "'Ready for the Mosh Pit Shaka Brah.'",
  "'Bring us the girl, wipe away the debt.'",
  "'We can get better. Because we're not dead yet.'",
  "'If this is as happy as happy gets well I'm fine with that.'",
  "'Is mayonnaise an instrument?'"
];

var author = [
  "- Keanu Reeves",
  "- Cookie Monster",
  "- Michael Scott",
  "- Mike Aruba",
  "- Chewbacca",
  "- Abraham Lincoln",
  "- Arin Hanson",
  "- Danny Sexbang",
  "- Grog Strongjaw",
  "- Anon",
  "- Bo Burnham",
  "- George Watsky",
  "- Guiness",
  "- Mr Torgue",
  "- The guitar of that one dude in Neck Deep in that one music video",
  "- The Wonder Years",
  "- GLaDOS",
  "- Cave Johnson",
  "- Max Caulfield",
  "- Robert Lutece",
  "- Frank Turner",
  "- Bowling for Soup",
  "- Patrick Star"
]







function newQuote(){
var rndNum = Math.floor(Math.random()*quote.length);
  var rndQuote = quote[rndNum];
  var rndAuthor = author[rndNum];
  var fullQuote = rndQuote+rndAuthor;
  var twitLink = "https://twitter.com/intent/tweet?text=" + fullQuote;
  
  if (fullQuote.length>280){
    twitLink="https://twitter.com/intent/tweet?text=I%20just%20found%20a%20%23meaty%20%23quote%2C%20but%20it%27s%20too%20long%20%23to%20share%20with%20you%20all%2C%20%23sucksforyou.%20Get%20your%20own%20at%20https%3A%2F%2Fcodepen.io%2FJobo_v22%2Ffull%2FvdeXEL%2F&source=webclient"
  };
  
  document.getElementById('quoteDisplay').innerHTML = rndQuote;
  document.getElementById('authorDisplay').innerHTML= rndAuthor;
  document.getElementById('twitterButton').setAttribute("href", twitLink);
};
  
$("#quoteButton").on("click",function(){
  randomColor();
  newQuote();
});



//THIS IS WHERE I NEED EITHER HELP, OR A PRIEST.
/*
function shareIt() {

  var currentQuote = document.getElementById('quoteDisplay').value;
  var currentAuthor= document.getElementById('authorDisplay').value;
  
  var fullQuote = (currentQuote + currentAuthor).join("");
  
  var twitLink = "https://twitter.com/intent/tweet?text=" + fullQuote;
  
  
 if (fullQuote.length>280){
    
    
    
    document.getElementById("twitterButton").innerHTML =
    window.open("https://twitter.com/?status=I+just+found+a+%23meaty+%23quote,+but+it's+too+long+%23to+share+with+you+all,+%23sucksforyou.+Get+your+own+at+https://codepen.io/Jobo_v22/full/vdeXEL/");
                           }
  
  else {
    window.open(twitLink)
    ;}
 
  
  
  
};
  

  $("#twitterButton").on("click",function(){
    shareIt();
  })


  /*
  var fullQuote = (quote[rndNum] + author[rndNum]).join('');
  //now we need to push the quote into the social share links... twitter first
  
  var twitLink = ('https://twitter.com/?status='+ fullQuote.replace(' ','+')).join('');
  
  if (fullQuote.length>280){
    
    
    
    document.getElementById("twitterButton").innerHTML =
    window.location.href = "https://twitter.com/?status=I+just+found+a+%23meaty+%23quote,+but+it's+too+long+%23to+share+with+you+all,+%23sucksforyou.+Get+your+own+at+https://codepen.io/Jobo_v22/full/vdeXEL/";
                           }
  
  else {
       document.getElementById("twitterButton").innerHTML = window.location.href= twitLink;
       ;}
};
*/
  
  
  });
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console