Untitled
3 years ago in HTML
<!DOCTYPE html>
<html>
<head>
<title>Bad Reviews</title>
<meta charset="UTF-8">
<meta name="theme-color" content="#E71800" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/snackbar.min.css">
<style>
header {
padding-left: 20px;
padding-right: 20px;
position: fixed;
width: 100%;
top: 0;
overflow: hidden;
height: 56px;
z-index: 2;
}
.content {
margin-top: 66px;
padding: 0px;
z-index: 1;
margin-bottom: 56px;
}
button:focus {
outline: none !important;
}
footer {
position: fixed;
width: 100%;
bottom: 0;
overflow: hidden;
z-index: 3;
}
.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
</head>
<main class="noselect">
<header class="w3-red w3-card-4">
<h3>Bad Reviews</h3>
</header>
<div class="content">
<div class="w3-panel w3-leftbar w3-rightbar w3-pale-red w3-border-red">
<p>
ကူးချင်သော စာကို နှိပ်၍ ကူးပါ။
</p>
</div>
<table id="commentsTable" class="w3-table-all w3-hoverable">
</table>
</div>
<footer>
<div class="w3-container w3-center w3-light-grey">
<h6>
Proudly powered by a Myanmar developer.
</h6>
</div>
</footer>
</main>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/src/js/snackbar.min.js" type="text/javascript"></script>
<script type="text/javascript">
var commentsTable = document.getElementById("commentsTable");
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
return clipboardData.setData("Text", text);
}
else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
textarea.style.position = "fixed"; // Prevent scrolling to bottom of page in Microsoft Edge.
document.body.appendChild(textarea);
textarea.select();
try {
return document.execCommand("copy"); // Security exception may be thrown by some browsers.
}
catch (ex) {
console.warn("Copy to clipboard failed.", ex);
return false;
}
finally {
document.body.removeChild(textarea);
}
}
}
function copyText(comment) {
var message = copyToClipboard(comment) ? "text copied" : "cannot copy text";
Snackbar.show({
text: message,
actionText: 'OK',
actionTextColor: '#E71800'
});
}
function createRow(comment) {
var tr = document.createElement("tr");
tr.classList.add("w3-hover-red");
var td = document.createElement("td");
td.innerHTML = comment;
tr.appendChild(td);
tr.setAttribute( "onClick", "javascript: copyText(this.innerText);" );
return tr;
}
var comments = [
"Malicious fake news app that steal customer information. It is unsafe for everyone.",
"All are misleading news and information only! They are just releasing fake news.",
"Useless app! Lots of spams! And They're collecting the personal data.",
"The worst app I have ever used.",
"Useless app. Full of lies!",
"Fake news app. Don't download, don't trust them!"
];
for (i = 0; i < comments.length; i++)
{
commentsTable.appendChild(createRow(comments[i]));
}
</script>
</html>