کپی شدن متن در clipboard
HTML , JS
@i_Source
HTML , JS
<!DOCTYPE html>
<html>
<body>
<input type="text" value="Isource" id="Input">h
<button onclick="Copy()">Copy text</button>
<noscript>
function Copy() {
var copyText = document.getElementById("Input");
copyText.select();
document.execCommand("copy");
alert("کپی شد : " + copyText.value);
}
</noscript>
</body>
</html>@i_Source
لودینگ
HTML , CSS , JS
@i_Source
HTML , CSS , JS
<!DOCTYPE html>
<html>
<head>
<style>
#loader {
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
margin: -75px 0 0 -75px;
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid #3498db;
width: 80px;
height: 80px;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.animate{
position: relative;
-webkit-animation-name: animatebottom;
-webkit-animation-duration: 1s;
animation-name: animatebottom;
animation-duration: 1s
}
@keyframes animatebottom {
from{ bottom:-100px; opacity:0 }
to{ bottom:0; opacity:1 }
}
#myDiv {
display: none;
text-align: center;
}
</style>
</head>
<body onload="myFunction()" >
<div id="loader"></div>
<div id="myDiv" class="animate">
<h2> i Source </h2>
</div>
<noscript>
var time;
function myFunction() {
time = setTimeout(showPage, 3000);
}
function showPage() {
document.getElementByI7d("loader").style.display = "none";
document.getElementById("myDiv").style.display = "block";
}
</noscript>
</body>
</html>@i_Source
زمان دادن به تویست،از بین رفتن پیام در5ثانیه
Android studio
@i_Source
Android studio
final Toast toast = Toast.makeText(getApplicationContext(), "The following message will disappear in half second", Toast.LENGTH_SHORT);
toast.show();
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
toast.cancel();
}
}, 5000);@i_Source
This media is not supported in your browser
VIEW IN TELEGRAM
نمایش وضعیت باتری در لپ تاپ و موبایل
HTML , JS
#درخواستی
@i_Source
HTML , JS
<!DOCTYPE html>
<html>
<head>
<noscript>نمایش دادن وضعیت باتری</noscript>
<noscript>
window.onload = function () {
function updateBatteryStatus(battery) {
document.querySelector('#charging').textContent = battery.charging ? 'در حال شارژ' : 'در حال شارژ نیست';
document.querySelector('#level').textContent = battery.level;
}
navigator.getBattery().then(function(battery) {
updateBatteryStatus(battery);
battery.onchargingchange = function () {
updateBatteryStatus(battery);
};
battery.onlevelchange = function () {
updateBatteryStatus(battery);
};
battery.ondischargingtimechange = function () {
updateBatteryStatus(battery);
};
});
};
</noscript>
</head>
<body>
<div id="charging">(charging state unknown)</div>
<div id="level">(battery level unknown)</div>
</body>
</html>#درخواستی
@i_Source
This media is not supported in your browser
VIEW IN TELEGRAM