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.

            
              <meta name="viewport" content="width=device-width, initial-scale=1">
<h1>Tipform</h1>
<p>Tipするためのフォームです。JSの練習に作りました。<br />現在対応しているtipbot→tipmona/zenyhime/zenytips/tipnem/tipxrp/tip_xpchan/bch_tip<br />JSファイル→<a  target="_blank" href="http://monaform.starfree.jp/js/tip.js">http://monaform.starfree.jp/js/tip.js</a><br /><a  download="Tip.js" href="http://monaform.starfree.jp/js/tip.js"></a>
<a  download="Tip.js" href="http://monaform.starfree.jp/js/tip.js"><button  class="DL">DLはこちら</button></a></p>
<hr>
<div  align="center">
<h4>送金する通貨の種類</h4>
<select  placeholder="パラメータを入力してください" id="type" name="test">
<option  value="tipmona">MONA</option>
<option  value="zenyhime">ZNY(ぜにぃ姫)</option>
<option  value="zenytips">ZNY(りん姫)</option>
<option  value="tipnem">XEM</option>
<option  value="tipxrp">XRP</option>
<option  value="bch_tips">BCH</option>
<option  value="tip_XPchan">XP</option>
</select>
<input  onclick="balance();" value="残高確認" type="submit">
<h4>送り先のTwitterID(@含む)</h4>
<input  value="@" id="to">
<h4>送る数量</h4>
<input  placeholder="投げ銭額(12桁まで)" maxlength="12" id="amount" type="number">
<h4>mosaic名(XEMのみ)</h4>
<input  placeholder="mosaic名を入力(XEMのみ)" id="name">
<h4>コメント</h4>
<textarea  placeholder="コメント(120文字まで)" maxlength="120" id="comment"></textarea>
<br /><input  onclick="tip();" value="Tip!!" type="submit">
</div>
            
          
!
            
              imput{width: 15%;}
input[type="submit"]{
background-color: orange;
color: black;
text-align: center;
border: 1px solid transparent;
font-size: 16px;
line-height: 1.5;
border-radius: .25rem;
margin-right: 20px;
width: auto;
}
.DL{
background-color: orange;
color: black;
text-align: center;
border: 1px solid transparent;
line-height: 1.5;
border-radius: .25rem;
margin-right: 20px;
}
body{
  background-color: aliceblue;
}
h1{
  color: orange;
}
h4{
  color: black;
}
#comment{
  width: 200px;
  height: 150px;
}
            
          
!
            
              //Tip.js
//Author:DAFU
//-------------------------------------------//
function tip(){
var url = "https://twitter.com/intent/tweet?text=";
var type = document.getElementById('type').value;
var to = document.getElementById('to').value;
var amount = document.getElementById('amount').value;
var name = encodeURIComponent(document.getElementById('name').value);
var comment = encodeURIComponent(document.getElementById('comment').value);
url += '%40'+type+'%20'+'tip'+'%20'+to+'%20'+amount+'%20'+name+'%0a%E3%80%90%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%80%91'+comment+'%0ahttp://monaform.starfree.jp/tip.html'+'%0a&hashtags=%E6%8A%95%E3%81%92%E9%8A%AD';

//%E6%8A%95%E3%81%92%E9%8A%AD=投げ銭
//%0a%E3%80%90%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%80%91=%0a【コメント】

location.href = url;
}

function balance(){
var url = "https://twitter.com/intent/tweet?text=";
var type = document.getElementById('type').value;
var balance = "balance";
if(type == "tipnem"){ balance += '%20all';}
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1; 
var day = now.getDate();
var hour = now.getHours(); 
var min = now.getMinutes(); 
var sec = now.getSeconds(); 

if(year < 2000) { year += 1900; }
if(month < 10) { month = "0" + month; }
if(day < 10) { day = "0" + day; }
if(hour < 10) { hour = "0" + hour; }
if(min < 10) { min = "0" + min; }
if(sec < 10) { sec = "0" + sec; }

url += '%40'+type+'%20'+balance+'%20'+'%E3%81%AA%E3%81%86'+'('+year+'%2F'+month+'%2F'+day+'%20'+hour+'%3A'+min+'%3A'+sec+')';
//%E3%81%AA%E3%81%86=なう


location.href = url;

}
            
          
!
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