Skip to content

Instantly share code, notes, and snippets.

@vegetaz
Last active March 9, 2022 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vegetaz/83e4610049446514b99e9a0ae9901c94 to your computer and use it in GitHub Desktop.
Save vegetaz/83e4610049446514b99e9a0ae9901c94 to your computer and use it in GitHub Desktop.
Script này sử dụng trong Tampermonkey để tối ưu hóa lại giao diện của voz.vn
// ==UserScript==
// @name theNextCuteVOZ
// @namespace theNextCuteVOZ
// @description Utilize for vOz. Lưu ý rằng mình không phải là idmresettrial, mình chỉ sử dụng code của thím ấy!
// @author idmresettrial
// @homepage voz.vn
// @run-at document-start
// @version 0.20201028020217
// ==/UserScript==
(function() {var css = "";
if (false || (document.domain == "voz.vn" || document.domain.substring(document.domain.indexOf(".voz.vn") + 1) == "voz.vn"))
css += [
"@media (max-width: 9999px) {",
" .block--messages .message ~ .message {",
" margin-top: 8px !important;",
" }",
"",
" .menu-header,",
" .menu-tabHeader,",
" .menu-tabHeader .tabs-tab.is-active,",
" .menu-tabHeader .tabs-tab:hover {",
" color: #ebeced !important;",
" background: #5c7099 !important;",
" border-color: #5c709900 !important;",
" }",
" .menu-tabHeader .tabs-tab {",
" color: #ebeced8a !important;",
" }",
"",
" .block-outer.block-outer--after {",
" padding-bottom: 8px !important;",
" }",
" .block-outer:not(.block-outer--after) .pageNavWrapper:not(.pageNavWrapper--forceShow) {",
" display: block !important;",
" }",
" .block-outer-main {",
" float: left !important;",
" }",
" .block-outer-main + .block-outer-opposite {",
" float: right !important;",
" margin-top: 0px !important;",
" }",
"",
" .block-outer .button,",
" .block-outer a.button {",
" padding-left: 5px !important;",
" padding-right: 5px !important;",
" }",
"",
" .block-outer-opposite a[data-xf-click=\"scroll-to\"] .button-text {",
" display: none !important;",
" }",
" .block-outer-opposite a[data-xf-click=\"scroll-to\"]:after {",
" content: \"Jump...\" !important;",
" }",
"",
" .pageNavSimple-el.pageNavSimple-el--first,",
" .pageNavSimple-el.pageNavSimple-el--last {",
" background: linear-gradient(0deg, #dce7f5, #e7ebef) !important;",
" }",
"",
" .pageNavSimple-el:not(.pageNavSimple-el--current) {",
" font-size: 0px !important;",
" min-width: 0px !important;",
" }",
" .pageNavSimple-el * {",
" font-size: 0.875rem !important;",
" }",
"",
" .offCanvasMenu {",
" transition: none !important;",
" }",
"",
" .bbImage.lazyloaded:not(:hover) {",
" max-height: 500px !important;",
" }",
"",
" .message-signature {",
" display: block !important;",
" }",
"}"
].join("\n");
if (false || (new RegExp("^https://voz.vn/.+$")).test(document.location.href))
css += [
"@media (max-width: 9999px) {",
" .p-body-sidebar,",
" .p-body-sidebarCol {",
" display: none !important;",
" }",
"}"
].join("\n");
if (false || (document.location.href.indexOf("https://voz.vn/a/") == 0))
css += [
"@media (min-width: 1366px) {",
" #header {",
" display: none !important;",
" }",
" .p-nav-smallLogo {",
" display: inline-block !important;",
" }",
" .p-sectionLinks.p-sectionLinks--empty {",
" display: none !important;",
" }",
"",
" .porta-article-item {",
" display: inline-block;",
" width: 32%;",
" margin-right: 5px;",
" }",
" .porta-article-item .porta-article-date {",
" margin-left: 0px;",
" }",
"",
" .message-cell.message-main {",
" position: relative;",
" }",
" .message-cell.message-main::before {",
" content: \'\';",
" position: absolute;",
" left: 0;",
" bottom: 0;",
" width: 100%;",
" height: 2em;",
" background: linear-gradient(to bottom, #ebeced00 0%, #ebeced 100%);",
" }",
"",
" .message-body {",
" height: 350px;",
" overflow: hidden;",
" text-overflow: clip;",
" }",
"",
" .bbImage.lazyloaded:not(:hover),",
" .bbImage.lazyloaded {",
" max-height: 250px !important;",
" }",
"}"
].join("\n");
if (false || (document.location.href.indexOf("https://voz.vn/search/") == 0))
css += [
"@media (max-width: 9999px) {",
" .p-title-value {",
" color: #888 !important;",
" }",
" .p-title-value a {",
" color: #fff !important;",
" }",
"}"
].join("\n");
if (false || (document.location.href.indexOf("https://voz.vn/u/") == 0))
css += [
"@media (min-width: 721px) {",
" .p-body-inner {",
" max-width: 69%;",
" }",
" .bbImageWrapper + br {",
" display: none;",
" }",
" .bbImage {",
" max-height: 69vh;",
" width: auto;",
" }",
"}"
].join("\n");
if (false || (document.location.href.indexOf("https://voz.vn/t/") == 0))
css += [
"@media (min-width: 721px) {",
" .bbImage {",
" max-height: 69vh;",
" width: auto;",
" }",
"}"
].join("\n");
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
} else {
// no head yet, stick it whereever
document.documentElement.appendChild(node);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment