Iwara UI Fix

An alternate style for 天音's Iwara 1-Click Filter script, also works as a standalone

2020-03-25 يوللانغان نەشرى. ئەڭ يېڭى نەشرىنى كۆرۈش.

  1. // ==UserScript==
  2. // @name Iwara UI Fix
  3. // @namespace none
  4. // @version 1.9
  5. // @description An alternate style for 天音's Iwara 1-Click Filter script, also works as a standalone
  6. // @author Nothson
  7. // @license CC BY-NC
  8. // @resource https://creativecommons.org/licenses/by-nc/4.0/
  9. // @match https://*.iwara.tv/*
  10. // @grant none
  11. // @run-at document-start
  12. // ==/UserScript==
  13.  
  14. /*
  15. --- Iwara UI Fix by Nothson : https://iwara.tv/users/Nothson ---
  16.  
  17. Mainly for scratching the Iwara's UI/UX itches I have.
  18. I'm not a senior web dev so plz don't scold me if the code below looks messy to you.
  19.  
  20. 25 Mar 2020
  21.  
  22. - Changed external player flair detection (thanks once again, Erono!)
  23. - Now, the accept/reject all friend requests button should actually work. I just lacked test subjects back then.
  24.  
  25. 10 Mar 2020
  26.  
  27. - On hover, 1-Click Filter's thumbnail background colors are now cleared to white
  28. - Fixed page number spacing and responsive scaling in forums and forum posts
  29. - Updated 1-Click Filter style conflict detection
  30.  
  31. 8 Mar 2020
  32.  
  33. - Improved page number styles
  34. - Added accept/reject all friend requests in friends page (with confirmation dialog)
  35. - The buttons only appear if there are more than 1 pending request in the page
  36.  
  37. 4 Mar 2020
  38.  
  39. - In the cards (video/image page or sidebar), improved view count and likes formatting (k and M prefix, decimals)
  40.  
  41. 3 Mar 2020
  42.  
  43. - Changed the approach to replace the blank images, there were some corner cases that make errors
  44. - Added profile picture border for special roles (profile page only) + unique animated border for my own
  45. - Added script version number at the bottom of the page
  46.  
  47. 2 Mar 2020
  48.  
  49. - Now, this script has conflicts with Iwara 1-Click Filter version 1.6 and newer
  50. - See the note at the bottom of any Iwara page for the workaround
  51.  
  52. 1 Mar 2020
  53.  
  54. - Added like percentage
  55. - Polaroid print style for video/image cards
  56. - Repositioned the card stats & icons
  57. - Added flairs, shown on the right of the card stats
  58. - Fire Icon: % like reaches the threshold (based on view count) + 200 views or more
  59. - Star Icon: % like reaches the threshold + 20k views or more
  60. - Lock Icon: Private video
  61. - Grid Icon: Multiple images
  62. - Screen Icon: External player (YouTube, Vimeo, etc.)
  63. - Card transitions on hover + extra transitions for some flairs
  64. - Added block backgrounds on many regions + made paddings and margins consistent
  65. - Fixed video player seek head
  66. - Changed forum post timestamp text color
  67. - Fixed user profile background, user lists (following/followers), and layout
  68. - Perhaps a few more things I did but couldn't remember, idk
  69.  
  70. Expected to run after Erono's Iwara 1-Click Filter Script: https://greasyfork.org/scripts/393957
  71. However, this script works as a standalone UI fix as well
  72. Tested on the latest version of Firefox & Chrome, plus responsive
  73. */
  74.  
  75. window.addEventListener('load', async function() {
  76. if (!window.location.href.match('://i.iwara.tv')) {
  77. let oneClickFilterConflict = document.head.querySelector('#css_custom') || document.head.querySelector('#css_likes') || document.head.querySelector('#css_colors');
  78.  
  79. let baseCSS = document.createElement('style'); // Add original CSS rules from 1-Click Filter
  80. baseCSS.innerHTML = `
  81. /* fix page */
  82. body {background-color: #eee;}
  83. section#content > .container {background-color: #eee; padding: 10px;}
  84. .container {width: unset;}
  85. @media (min-width: 1300px) {.container {width: 1300px;}}
  86.  
  87. /* fix overflow */
  88. #block-system-main, .row {margin-left: 0; margin-right: 0;}
  89. .col-sm-3, .col-sm-6, .col-sm-9, .col-xs-6, .col-sm-12 {padding-left: 0; padding-right: 0;}
  90. .view-videos .view-content .views-row, .view-images .view-content .views-row {padding-bottom: 0px;}
  91.  
  92. /* compact page */
  93. .view-content .col-sm-3, .view-content .col-sm-6 {width: 50%; float: left;}
  94. @media (min-width: 768px) {
  95. .view-content .col-sm-3 {width: 25%;}
  96. }
  97.  
  98. /* card style */
  99. .node.node-teaser {background-color: #ffffff; border: 1px solid #ccc; border-radius: 4px; padding: 5px; margin: 4px;}
  100. .node.node-teaser .icon-bg, .node.node-teaser .private-video {width: calc(100% - 10px);}
  101. .node.node-teaser .icon-bg .likes-icon {filter: drop-shadow(0px 0px 2px #000);}
  102. .node.node-teaser h3.title {font-size: 1em; line-height: 1em; height: 3em; margin-bottom: 0px; overflow: hidden;}
  103. .node.node-teaser .username {display: block; white-space: nowrap; overflow: hidden;}
  104. .node.node-teaser .field-item {min-height: 2em;}
  105. .node.node-video .content {margin: 4px;}
  106. .sidebar .block.block-views,
  107. .sidebar .block.block-facetapi,
  108. .sidebar .block.block-mainblocks {background-color: #fafafa; border: 1px solid #ccc; border-radius: 4px; padding: 8px; margin: 4px 4px 8px 4px;}
  109. .sidebar .node.node-sidebar_teaser {background-color: #ffffff; border: 1px solid #ccc; border-radius: 2px; padding: 4px; margin: 2px;}
  110. .sidebar .node.node-sidebar_teaser .icon-bg, .node.node-sidebar_teaser .private-video {width: calc(100% - 8px);}
  111. .sidebar .node.node-sidebar_teaser .icon-bg .likes-icon {filter: drop-shadow(0px 0px 2px #000);}
  112. .item-list ul.pager li {margin: 0; padding: 0;}
  113. .item-list ul.pager li.pager-current,
  114. .item-list ul.pager li.pager-ellipsis,
  115. .item-list ul.pager li > a {background: #fafafa; border: 1px solid #ccc; border-radius: 8px; padding: 4px 16px; margin: 0px; display: inline-block;}
  116.  
  117. /* video style for external link (youtube) */
  118. /*
  119. .node.node-teaser .field-type-video-embed-field {border: 4px solid #c33; background-color: #000;}
  120. .node.node-teaser .field-type-video-embed-field .field-items {overflow: hidden;}
  121. .node.node-teaser .field-type-video-embed-field .field-items .field-item {margin: -4px;}
  122. */
  123.  
  124. /* image style in subscriptions page */
  125. .view-subscriptions .field-type-image {border: 1px solid #ccc; background-color: #fff; padding: 5px;}
  126. .view-subscriptions .field-type-image .field-items {overflow: hidden;}
  127. .view-subscriptions .field-type-image .field-items .field-item {margin: -6px;}
  128.  
  129. /* search and playist */
  130. .node-wide_teaser {background-color: #fafafa; border: 1px solid #ccc; border-radius: 4px; padding: 4px; margin: 4px;}
  131. .node-wide_teaser {width: unset; word-break: break-all; min-height: 170px;}
  132. .node-wide_teaser .col-sm-2 {width: 230px; padding: 4px;}
  133. .node-wide_teaser .col-sm-10 {width: calc(100% - 230px); padding: 4px;}
  134. .node-wide_teaser .field-name-field-video {border: 1px solid #999;}
  135. .node-wide_teaser .field-name-field-video-url {border: 1px solid #999; position: absolute; top: 0px; left: -230px; margin: 4px;}
  136. @media (max-width: 768px) {.node-wide_teaser .field-name-field-video-url {display: none;}}
  137. .node-wide_teaser .field-name-field-images .field-item {display: unset;}
  138. .node-wide_teaser .field-name-field-images .field-item > a > img {width: calc(100%/3 - 8px); border: 1px solid #aaa; padding: 4px; margin: 4px;}
  139. .node-wide_teaser .field-name-field-images .field-item > video {width: calc(100%/1 - 8px); margin: 4px; border: 1px solid #aaa; padding: 4px; height: auto;}
  140. .node-wide_teaser .node-info {padding: 4px;}
  141. .node-wide_teaser .node-info .submitted {display: inline-block; width: 100%;}
  142. .node-wide_teaser .node-info .submitted h1.title {font-size: 28px; position: unset; margin: unset;}
  143. ul.facetapi-facetapi-tagcloud li > a {white-space: normal;}
  144. ul.facetapi-facetapi-tagcloud .element-invisible {display: none;}
  145.  
  146. /* footer */
  147. #wrapper {margin-bottom: unset; padding-bottom: unset;}
  148. footer {height: unset;}
  149. footer .block {width: 25%; float: left;}
  150. footer .block.block-forum {width: 50%;}
  151. footer .copyright {float: unset;}
  152.  
  153. /* video player */
  154. /* expand volume and seekbar height */
  155. .video-js .vjs-volume-bar {margin: 1em 0em;}
  156. .video-js .vjs-volume-bar.vjs-slider-horizontal, .video-js .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {height: 1em;}
  157. .video-js .vjs-progress-holder, .video-js .vjs-progress-holder .vjs-load-progress, .video-js .vjs-progress-holder .vjs-play-progress {height: 1em;}
  158. `;
  159. baseCSS.id = 'xtension-base-css';
  160. document.head.appendChild(baseCSS);
  161.  
  162. let cards = document.querySelectorAll('.node-teaser, .node-sidebar_teaser');
  163. let styleOverride = document.createElement('style');
  164. styleOverride.id = 'xtension-css';
  165.  
  166. function logn (val, base) {
  167. return Math.log(val) / Math.log(base);
  168. }
  169.  
  170. function kilo2Number (text) {
  171. if (text.match('k') == null) {
  172. return {value: parseInt(text), isKilo: false};
  173. }
  174. else {
  175. return {value: parseFloat(text.replace('k', '')) * 1000, isKilo: true};
  176. }
  177. }
  178.  
  179. function number2Prefixed(value) {
  180. if (value < 999) {
  181. return value;
  182. }
  183. else if (value < 99999) {
  184. return (value / 1000).toFixed(1) + 'k';
  185. }
  186. else if (value < 999999) {
  187. return Math.floor(value / 1000) + 'k';
  188. }
  189. else {
  190. return (value / 1000000).toFixed(1) + 'M';
  191. }
  192. }
  193.  
  194. function getFlair (viewCount, likePercentage, card) {
  195. if (card.querySelector('.private-video')) {
  196. return 'lock';
  197. }
  198. else if (card.querySelector('.field-type-video-embed-field')) {
  199. return 'share';
  200. }
  201. else {
  202. let likeThreshold = 8 - logn(viewCount, 6);
  203. if (viewCount < 200) {
  204. return '';
  205. }
  206. else if (viewCount < 20000) {
  207. return (likePercentage > likeThreshold) ? 'fire' : '';
  208. }
  209. else {
  210. return (likePercentage > likeThreshold) ? 'star' : '';
  211. }
  212. }
  213. }
  214.  
  215. // HTML Mod
  216. cards.forEach(card => {
  217. let icons = card.querySelector('.icon-bg');
  218. if (icons) { // Rearrange stat icons, add like percentage and flairs
  219. if ((card.className.match('node-sidebar_teaser') && card.children.length > 1) || card.children.length > 3) {
  220. card.insertBefore(icons, card.children[2]);
  221. }
  222. else {
  223. card.insertBefore(icons, card.children[1]);
  224. }
  225. if (card.className.match('node-image') && icons.children.length == 3) {
  226. icons.appendChild(icons.children[1]);
  227. icons.appendChild(icons.children[0]);
  228. }
  229. else if (icons.children.length == 2) {
  230. icons.appendChild(icons.children[0]);
  231. }
  232.  
  233. let likeNode = icons.querySelector('.glyphicon-heart');
  234. if (likeNode && !(card.className.match('node-image') && card.className.match('node-sidebar_teaser'))) {
  235. likeNode = likeNode.nextSibling;
  236. let viewNode = icons.querySelector('.glyphicon-eye-open').nextSibling;
  237. let viewNodeTxt = viewNode.wholeText.trim();
  238. let likeNodeTxt = likeNode.wholeText.trim();
  239. let like = kilo2Number(likeNodeTxt);
  240. let viewCount = kilo2Number(viewNodeTxt);
  241. let likePercentage = (viewCount == 0) ? 0 : parseFloat(like.value / viewCount.value * 100).toFixed(2);
  242. viewNode.parentElement.setAttribute('title', viewNodeTxt);
  243. viewNode.nodeValue = ' ' + number2Prefixed(viewCount.value);
  244. if (likeNode) {
  245. likeNode.parentElement.setAttribute('title', likeNodeTxt);
  246. likeNode.nodeValue = ' ' + number2Prefixed(like.value);
  247. }
  248. if (!card.className.match('node-sidebar_teaser')) {
  249. let likePercentageHTML = document.createElement('div');
  250. likePercentageHTML.className += 'right-icon likes-icon like-percentage';
  251. if (like.isKilo || viewCount.isKilo) {
  252. likePercentageHTML.innerText = '(~' + likePercentage + '%)';
  253. }
  254. else {
  255. likePercentageHTML.innerText = '(' + likePercentage + '%)';
  256. }
  257. likeNode.parentElement.parentElement.appendChild(likePercentageHTML);
  258. }
  259. if (card.className.match('node-video')) {
  260. let flair = getFlair(viewCount.value, likePercentage, card);
  261. if (flair) {
  262. card.className += ' flair-' + flair;
  263. let flairNode = document.createElement('div');
  264. flairNode.setAttribute('class', 'left-icon flair-icon');
  265. flairNode.innerHTML = '<i class="glyphicon glyphicon-' + flair + '" title="Flair"></i>';
  266. icons.appendChild(flairNode);
  267. }
  268. }
  269. }
  270. }
  271. else {
  272. let blankFooter = document.createElement('div');
  273. blankFooter.setAttribute('class', 'icon-bg');
  274. card.appendChild(blankFooter);
  275. }
  276.  
  277. let thumbnail = card.querySelector('a > img');
  278. if (!thumbnail) { // Fix inconsistent height of the cards with no thumbnail
  279. let imgArea = card.firstElementChild;
  280. let title = card.querySelector('h3.title > a');
  281. if (!title) {
  282. title = card.querySelector('.field-item > a');
  283. }
  284. let url = (title) ? title.getAttribute('href') : '';
  285. imgArea.innerHTML = '<div class="field blankimg"><div class="field-items"><div class="field-item"><a' +
  286. (url ? ' href="' + url + '"' : '') +
  287. (title ? ' title="' + title.innerText + '"' : '') +
  288. '>' +
  289. (card.className.match('node-sidebar_teaser') ? '<img width="141" height="84"></img>' : '<img width="220" height="150"></img>') +
  290. '</a></div></div></div>';
  291. }
  292. });
  293.  
  294. let contentInfo = document.querySelector('body.node-type-video .node.node-video .node-info .node-views, body.node-type-image .node.node-image .node-info .node-views');
  295. if (contentInfo) { // Add like percentage for a video/image page
  296. let heartIcon = contentInfo.querySelector('.glyphicon.glyphicon-heart');
  297. if (heartIcon) {
  298. let eyeIcon = contentInfo.querySelector('.glyphicon.glyphicon-eye-open');
  299. let viewCount = parseInt(eyeIcon.nextSibling.nodeValue.replace(/,/g, ''));
  300. let like = parseInt(heartIcon.nextSibling.nodeValue.replace(/,/g, ''));
  301. let likePercentage = (viewCount == 0) ? 0 : parseFloat(like / viewCount * 100).toFixed(4);
  302. heartIcon.nextSibling.nodeValue = ' ' + like + ' (' + likePercentage + '%)';
  303. contentInfo.appendChild(contentInfo.querySelector('.glyphicon.glyphicon-heart'));
  304. contentInfo.appendChild(contentInfo.querySelector('.glyphicon.glyphicon-eye-open').previousSibling);
  305. }
  306. }
  307.  
  308. let copyrightNode = document.querySelector('footer .copyright');
  309. if (copyrightNode) { // Add script credits
  310. let innerHTMLExt = '<br><u><b><a href="https://greasyfork.org/en/scripts/397126">Iwara UI Fix</a></b></u> version ' + GM_info.script.version + ' by <u><b><a href="/users/nothson">Nothson</a></b></u><br><b>Note:</b> <u><b><a href="/images/iwara-1-click-filter">Iwara 1-Click Filter</a></b></u>\'s <b>User Style</b> and/or <b>Like Colors</b> are enabled. Disable them in the in-page settings, then refresh to prevent style conflict.';
  311. if (!oneClickFilterConflict) {
  312. innerHTMLExt = '<br><u><b><a href="https://greasyfork.org/en/scripts/397126">Iwara UI Fix</a></b></u> version ' + GM_info.script.version + ' by <u><b><a href="/users/nothson">Nothson</a></b></u><br><i>Based on CSS rules from <u><b><a href="/images/iwara-1-click-filter">Iwara 1-Click Filter</a></b></u> (version 1.5) by <u><b><a href="/users/erono">Erono</a></b></u></i>.';
  313. }
  314. copyrightNode.innerHTML = copyrightNode.firstChild.nodeValue + innerHTMLExt;
  315. }
  316.  
  317. let addForumCommentElement = document.querySelectorAll('#forum-comments h2.comment-form, #forum-comments noscript, #forum-comments #comment-form');
  318. if (addForumCommentElement.length > 0) { // Wrap forum's "Add new comment" section in a block
  319. let commentBlock = document.createElement('div');
  320. commentBlock.id = 'add-forum-comment-block';
  321. addForumCommentElement.forEach(elem => {
  322. commentBlock.appendChild(elem);
  323. });
  324. document.getElementById('forum-comments').appendChild(commentBlock);
  325. }
  326.  
  327. let creatorProfileCard = document.querySelector('body.page-user.page-user- #block-views-profile-block .field-content');
  328. if (creatorProfileCard) {
  329. if (document.body.className.match('page-user-603563')) { // My special profile pic border + tooltip
  330. creatorProfileCard.innerHTML = creatorProfileCard.innerHTML + creatorProfileCard.innerHTML + creatorProfileCard.innerHTML + creatorProfileCard.innerHTML + creatorProfileCard.innerHTML + creatorProfileCard.innerHTML + creatorProfileCard.innerHTML;
  331. creatorProfileCard.children[5].setAttribute('src', 'https://i.imgur.com/fQZC1bB.png');
  332. creatorProfileCard.setAttribute('title', 'The creator of "Iwara UI Fix"');
  333. }
  334. else { // User role profile pic border
  335. let role = document.querySelector('body.page-user.page-user- #content div.content > div.profile > div:last-child > ul > li');
  336. if (role) {
  337. switch (role.innerText) {
  338. case 'administrator':
  339. creatorProfileCard.className += ' role-admin';
  340. creatorProfileCard.setAttribute('title', 'Administrator');
  341. break;
  342. case 'moderator':
  343. creatorProfileCard.className += ' role-mod';
  344. creatorProfileCard.setAttribute('title', 'Moderator');
  345. break;
  346. }
  347. role = role.parentElement.parentElement;
  348. role.parentElement.removeChild(role);
  349. }
  350. }
  351. }
  352. let friendsList = document.querySelector('body.page-user-friends table.table');
  353. if (friendsList) { // Accept/reject all friends buttons
  354. let acceptReqButton = friendsList.querySelectorAll('tr.warning button[data-original-title="Accept"]');
  355. let rejectReqButton = friendsList.querySelectorAll('tr.warning button[data-original-title="Reject"]');
  356. let doAllReqButtonsArea = null;
  357. if (acceptReqButton.length > 1) {
  358. doAllReqButtonsArea = friendsList.querySelector('tr:first-child th:last-child');
  359. doAllReqButtonsArea.innerHTML = '<button id="accept-all-friends" class="btn btn-xs btn-success accept-friend" title="Accept all pending requests"><span class="glyphicon glyphicon-ok"></span><span class="glyphicon glyphicon-ok"></span></button><button id="reject-all-friends" class="btn btn-xs btn-danger remove-friend" title="Reject all pending requests"><span class="glyphicon glyphicon-remove"></span><span class="glyphicon glyphicon-remove"></span></button>';
  360. document.getElementById('accept-all-friends').addEventListener('click', function acceptAllFriends () {
  361. if (confirm("Accept all pending friend requests?")) {
  362. while (doAllReqButtonsArea.lastElementChild) {
  363. doAllReqButtonsArea.removeChild(doAllReqButtonsArea.lastElementChild);
  364. }
  365. acceptReqButton.forEach(e => {e.click();});
  366. }
  367. }, false);
  368. document.getElementById('reject-all-friends').addEventListener('click', function rejectAllFriends () {
  369. if (confirm("Reject all pending friend requests?")) {
  370. while (doAllReqButtonsArea.lastElementChild) {
  371. doAllReqButtonsArea.removeChild(doAllReqButtonsArea.lastElementChild);
  372. }
  373. rejectReqButton.forEach(e => {e.click();});
  374. }
  375. }, false);
  376. }
  377. }
  378.  
  379. // CSS Override
  380. styleOverride.innerHTML += `
  381. .node.node-teaser,
  382. .node.node-sidebar_teaser,
  383. .node.node-teaser i,
  384. .node.node-sidebar_teaser i,
  385. .node.node-teaser img,
  386. .node.node-sidebar_teaser img {
  387. transition: 0.15s!important;
  388. }
  389.  
  390. /*
  391. .node.node-teaser img,
  392. .node.node-sidebar_teaser img {
  393. filter: contrast(0)!important;
  394. }
  395. */
  396.  
  397. .node.node-teaser h3.title,
  398. .node.node-sidebar_teaser h3.title {
  399. height: auto!important;
  400. white-space: nowrap!important;
  401. text-overflow: ellipsis!important;
  402. }
  403.  
  404. .node.node-teaser:hover,
  405. .node.node-sidebar_teaser:hover {
  406. background: #fff;
  407. box-shadow: 3pt 12pt 12pt -6pt #0004;
  408. transform: rotate3d(0.9, -0.1, 0.1, 3deg) scale(1.02);
  409. z-index: 42;
  410. }
  411.  
  412. .node.node-teaser.flair-fire:hover,
  413. .node.node-sidebar_teaser.flair-fire:hover {
  414. transform: rotate3d(0.9, -0.1, 0.1, -4.5deg) scale(1.02);
  415. border-color: #f40a;
  416. }
  417.  
  418. .node.node-teaser.flair-star:hover,
  419. .node.node-sidebar_teaser.flair-star:hover {
  420. transform: rotate3d(-0.9, 0.1, -0.2, 4.5deg) scale(1.04);
  421. filter: drop-shadow(-0.2em -0.2em 2em #ffe8);
  422. outline: 0.32em solid #fe8;
  423. border: 0;
  424. border-radius: 0;
  425. }
  426.  
  427. .views-responsive-grid.views-responsive-grid-horizontal.views-columns-2 > * {
  428. margin-bottom: 0;
  429. }
  430.  
  431. .node.node-teaser .icon-bg,
  432. .node.node-sidebar_teaser .icon-bg {
  433. width: 100%!important;
  434. position: unset;
  435. margin-top: 0.4em;
  436. padding: 0;
  437. }
  438.  
  439. .node.node-sidebar_teaser .icon-bg {
  440. min-height: 1.35em;
  441. }
  442.  
  443. .node:hover .icon-bg {
  444. background: unset!important;
  445. }
  446.  
  447. .node.node-teaser .left-icon,
  448. .node.node-sidebar_teaser .left-icon {
  449. color: inherit;
  450. margin-left: 0.1em;
  451. font-size: 0.8em;
  452. filter: unset!important;
  453.  
  454. }
  455.  
  456. .node.node-teaser .right-icon,
  457. .node.node-sidebar_teaser .right-icon {
  458. float: left!important;
  459. color: inherit;
  460. margin-left: 0.5em;
  461. font-size: 0.8em;
  462. filter: unset!important;
  463. }
  464.  
  465. .node-image.node-sidebar_teaser .right-icon:first-of-type {
  466. margin-left: 0;
  467. }
  468.  
  469. .node.node-teaser .left-icon.multiple-icon,
  470. .node.node-sidebar_teaser .left-icon.multiple-icon {
  471. float: right!important;
  472. color: inherit;
  473. margin-left: 0.5em;
  474. font-size: 0.8em;
  475. filter: unset!important;
  476. }
  477.  
  478. .node.node-teaser .left-icon.flair-icon,
  479. .node.node-sidebar_teaser .left-icon.flair-icon {
  480. float: right!important;
  481. color: inherit;
  482. margin-right: 0.1em;
  483. font-size: 0.8em;
  484. filter: unset!important;
  485. }
  486.  
  487. .node.node-teaser .right-icon.like-percentage,
  488. .node.node-sidebar_teaser .right-icon.like-percentage {
  489. margin-left: 0.3em;
  490. }
  491. .right-icon.ratio-icon {
  492. display: none;
  493. }
  494.  
  495. .node.node-teaser h3.title {
  496. width: 100%;
  497. height: 2em;
  498. }
  499.  
  500. .node.node-teaser.flair-lock:hover [title="Flair"],
  501. .node.node-sidebar_teaser.flair-lock:hover [title="Flair"] {
  502. color: #bbbf;
  503. }
  504.  
  505. .node.node-teaser.flair-fire:hover [title="Flair"],
  506. .node.node-sidebar_teaser.flair-fire:hover [title="Flair"] {
  507. color: #f40f;
  508. filter: drop-shadow(0.12em -0.16em 0 #f806) drop-shadow(-0.12em -0.04em 0.06em #fd08);
  509. }
  510.  
  511. .node.node-teaser.flair-star:hover [title="Flair"] {
  512. color: #fd4f;
  513. transform: rotate(18deg) scale(3.2);
  514. filter: drop-shadow(1pt 0.5pt 0.5pt #0002) drop-shadow(-0.04em -0.04em 0.1em #ffd8) drop-shadow(0.08em 0.08em 0.02em #fb0f);
  515. }
  516.  
  517. .node.node-sidebar_teaser.flair-star:hover [title="Flair"] {
  518. color: #fd4f;
  519. transform: rotate(18deg) scale(2.4);
  520. filter: drop-shadow(1pt 0.5pt 0.5pt #0002) drop-shadow(-0.04em -0.04em 0.1em #ffd8) drop-shadow(0.12em 0.12em 0.01em #fb0f);
  521. }
  522.  
  523. .node.node-video.node-teaser.flair-lock:hover > div > div div > a > img,
  524. .node.node-video.node-sidebar_teaser.flair-lock:hover > div div > div > a > img {
  525. filter: grayscale(1);
  526. }
  527.  
  528. .node.node-video.node-teaser.flair-fire:hover > div > div div > a > img,
  529. .node.node-video.node-sidebar_teaser.flair-fire:hover > div > div div > a > img {
  530. filter: sepia(0.3) contrast(1.25) hue-rotate(-15deg) saturate(1.25);
  531. }
  532.  
  533. .node.node-video.node-teaser.flair-star:hover > div > div div > a > img,
  534. .node.node-video.node-sidebar_teaser.flair-star:hover > div > div div > a > img {
  535. filter: sepia(0.5) brightness(1.1) contrast(1.25) saturate(1.5);
  536. }
  537.  
  538. .node.node-teaser .blankimg,
  539. .node.node-sidebar_teaser .blankimg {
  540. display: block;
  541. border: #ccc 0.5pt dashed;
  542. }
  543.  
  544. .node.node-teaser .blankimg a,
  545. .node.node-sidebar_teaser .blankimg a {
  546. filter: opacity(0);
  547. }
  548.  
  549. .video-js .vjs-play-progress:before {
  550. top: -40%;
  551. color: #fffd;
  552. font-size: 1.8em;
  553. box-shadow: 0 8pt 8pt -4pt #0006;
  554. }
  555.  
  556. .video-js .vjs-volume-level:before {
  557. display: none;
  558. }
  559.  
  560. body.front #wrapper > section > .container,
  561. body.page-node-add form,
  562. body.page-node-edit form,
  563. body.page-user-friends #content > .container,
  564. body.page-user-liked #content > .container,
  565. body.page-subscriptions #content > .container,
  566. body.page-my-content #content > .container,
  567. body.page-messages #content > .container,
  568. body.page-user-edit form,
  569. body.page-comment #content > .container,
  570. body.page-forum #content > .container,
  571. body.node-type-video .node.node-video > .content,
  572. body.node-type-image .node.node-image > .content,
  573. #comments,
  574. #add-forum-comment-block,
  575. .region.region-content .view-id-profile,
  576. .node.node-journal,
  577. [class*="block-views"],
  578. .sidebar .block.block-facetapi,
  579. .sidebar .block.block-mainblocks,
  580. .region.region-sidebar .extra-content-block {
  581. background-color: #fafafa;
  582. border: 1px solid #ccc;
  583. border-radius: 4px!important;
  584. padding: 0.8em!important;
  585. margin: 0.5em 0.5em 1em 0.5em!important;
  586. }
  587.  
  588. body.page-user #content {
  589. background-attachment: fixed;
  590. }
  591.  
  592. body.page-user- #content > .container {
  593. background-color: #eee8;
  594. }
  595.  
  596. body.page-user [class*="block-views"],
  597. body.page-user .sidebar .block.block-views,
  598. #block-mainblocks-user-connect,
  599. body.page-user #comments {
  600. background-color: #fafafad0;
  601. }
  602.  
  603. body.page-user.page-user- #block-views-profile-block .field-content.role-admin > img {
  604. border: #f88 6pt solid;
  605. }
  606.  
  607. body.page-user.page-user- #block-views-profile-block .field-content.role-mod > img {
  608. border: #8af 6pt solid;
  609. }
  610.  
  611. body.page-node-add form,
  612. body.page-node-edit form {
  613. background-color: #ffffff;
  614. }
  615.  
  616. body.front #wrapper > section > .container,
  617. body.page-user-friends #content > .container,
  618. body.page-user-liked #content > .container,
  619. body.page-subscriptions #content > .container,
  620. body.page-my-content #content > .container,
  621. body.page-messages #content > .container,
  622. body.page-user-edit form,
  623. body.page-comment #content > .container,
  624. body.page-forum #content > .container {
  625. margin-left: auto!important;
  626. margin-right: auto!important;
  627. }
  628. body.page-user-friends tr:first-child th:last-child {
  629. text-align: right;
  630. }
  631.  
  632. body.page-user-friends #accept-all-friends,
  633. body.page-user-friends #reject-all-friends {
  634. position: relative;
  635. }
  636.  
  637. body.page-user-friends #reject-all-friends {
  638. margin-left: 4px;
  639. }
  640.  
  641. body.page-user-friends #accept-all-friends span:first-child {
  642. transform: translateX(-3px);
  643. filter: drop-shadow(3px 0 0 #2ecc71);
  644. z-index: 1;
  645. }
  646.  
  647. body.page-user-friends #reject-all-friends span:first-child {
  648. transform: translateX(-3px);
  649. filter: drop-shadow(3px 0 0 #e74c3c);
  650. z-index: 1;
  651. }
  652.  
  653. body.page-user-friends #accept-all-friends span:last-child,
  654. body.page-user-friends #reject-all-friends span:last-child {
  655. position: absolute;
  656. top: 29%;
  657. left: 40%;
  658. color: #fffa;
  659. }
  660.  
  661. body.page-forum #content > .container .panel-group > * {
  662. margin-top: 1em;
  663. }
  664.  
  665. body.node-type-video .node.node-video .node-info .node-views .glyphicon.glyphicon-heart,
  666. body.node-type-image .node.node-image .node-info .node-views .glyphicon.glyphicon-heart {
  667. margin-left: 0.5em;
  668. }
  669.  
  670. .node.node-wide_teaser {
  671. padding: 0.8em!important;
  672. margin: 0.5em 0.5em 1em 0.5em!important;
  673. }
  674.  
  675. .forum-post {
  676. margin: 0.5em 0.5em 1em 0.5em!important;
  677. }
  678.  
  679. .forum-post > .panel-heading > .text-muted {
  680. color: #0008;
  681. }
  682.  
  683. body.node-type-video .node.node-video > .content,
  684. body.node-type-image .node.node-image > .content {
  685. padding: 0!important;
  686. }
  687.  
  688. body.node-type-video .node.node-video > .content > .node-buttons,
  689. body.node-type-image .node.node-image > .content > .node-buttons {
  690. margin-bottom: 0;
  691. }
  692.  
  693. body.node-type-video .node.node-video > .content > .well {
  694. max-width: 100%!important;
  695. margin: 0;
  696. }
  697.  
  698. .node-journal #comments {
  699. border: unset;
  700. }
  701.  
  702. .view-profile.view-display-id-block {
  703. background-color: unset;
  704. padding: unset;
  705. box-shadow: unset;
  706. }
  707.  
  708. #block-views-profile-block {
  709. background-color: #fafafa;
  710. box-shadow: 2pt 8pt 8pt -4pt #0004;
  711. }
  712.  
  713. .region.region-sidebar .view-id-profile .views-responsive-grid > .views-row > div img,
  714. .region.region-content .view-id-profile .views-responsive-grid > .views-row > div img {
  715. border-radius: 50%;
  716. overflow: hidden;
  717. border: #0001 0.2em solid;
  718. }
  719.  
  720. h1 {
  721. padding: 0.25em;
  722. margin: 0;
  723. }
  724.  
  725. #comments > h2.title {
  726. padding: 0.4em;
  727. margin-bottom: 0.8em;
  728. }
  729.  
  730. #add-forum-comment-block > h2,
  731. .extra-content-block {
  732. padding: 0.6em 0;
  733. }
  734.  
  735. .region.region-sidebar .extra-content-block {
  736. background-color: #0000;
  737. border: 0;
  738. overflow: hidden;
  739. }
  740.  
  741. .region.region-sidebar .extra-content-block iframe {
  742. transform: translateX(-8.75pt);
  743. }
  744.  
  745. .extra-content-block > center + br,
  746. body.node-type-video #block-extra-content-extra-content-block-5,
  747. body.node-type-video #block-extra-content-extra-content-block-8 {
  748. display: none;
  749. }
  750.  
  751. .pager {
  752. border-top: 0;
  753. }
  754.  
  755. #forum > div.view > div.row:first-of-type > div:first-of-type,
  756. #forum > div.view > div.row:nth-of-type(3) > div:first-of-type {
  757. width: unset;
  758. float: left;
  759. margin: 1.25em 0;
  760. }
  761.  
  762. #forum > div.view > div.row:first-of-type > div:last-of-type,
  763. #forum > div.view > div.row:nth-of-type(3) > div:last-of-type {
  764. width: unset;
  765. float: right;
  766. }
  767.  
  768. .forum-node-create-links {
  769. width: unset;
  770. }
  771.  
  772. #forum .pager {
  773. text-align: right;
  774. }
  775.  
  776. #forum-comments .pager li {
  777. margin: unset;
  778. padding: unset;
  779. }
  780.  
  781. div.item-list ul.pager > li,
  782. div.item-list ul.pager > li.pager-current,
  783. div.item-list ul.pager > li.pager-ellipsis,
  784. div.item-list ul.pager > li > a {
  785. margin: 0.2em 0;
  786. padding: 0;
  787. border: 0.05em #0000 solid;
  788. transition: 0.15s;
  789. }
  790.  
  791. div.item-list ul.pager > li > a,
  792. div.item-list ul.pager > li.pager-current,
  793. div.item-list ul.pager > li.pager-ellipsis {
  794. border-radius: 1em;
  795. padding: 0 0.6em;
  796. border: 0.05em #0002 solid;
  797. }
  798.  
  799. div.item-list ul.pager > li.pager-ellipsis {
  800. border: 0.05em #0000 solid;
  801. background: #0000;
  802. }
  803.  
  804. div.item-list ul.pager > li.pager-current,
  805. #forum-comments div.item-list ul.pager > li.pager-current {
  806. border: 0.05em #16a085c0 solid;
  807. margin: 0 0.1em;
  808. padding: 0 0.6em;
  809. background: #16a085c0;
  810. color: #fafafa;
  811. }
  812.  
  813. div.item-list ul.pager > li > a:hover {
  814. border: 0.05em solid;
  815. }
  816.  
  817. body.page-user-603563 #block-views-profile-block .field-content {
  818. position: relative;
  819. }
  820.  
  821. body.page-user-603563 #block-views-profile-block .field-content > img {
  822. width: 75%;
  823. margin: 3%;
  824. transform-origin: 48%;
  825. border: 0;
  826. }
  827.  
  828. body.page-user-603563 #block-views-profile-block .field-content > img:nth-child(1) {
  829. position: absolute;
  830. filter: contrast(0) brightness(0);
  831. transform: scale(1.05);
  832. }
  833.  
  834. body.page-user-603563 #block-views-profile-block .field-content > img:nth-child(2) {
  835. position: absolute;
  836. filter: contrast(0) sepia(1) saturate(3) brightness(1.7);
  837. animation: special-border 3.7s infinite linear;
  838. }
  839.  
  840. body.page-user-603563 #block-views-profile-block .field-content > img:nth-child(3) {
  841. position: absolute;
  842. filter: contrast(0) sepia(1) saturate(7) brightness(1.5) hue-rotate(120deg);
  843. animation: special-border 1.2s -0.41s infinite linear;
  844. }
  845.  
  846. body.page-user-603563 #block-views-profile-block .field-content > img:nth-child(4) {
  847. position: absolute;
  848. filter: contrast(0) sepia(1) saturate(7) brightness(1.2) hue-rotate(240deg);
  849. animation: special-border 2.5s -0.83s infinite linear;
  850. }
  851.  
  852. body.page-user-603563 #block-views-profile-block .field-content > img:nth-child(5) {
  853. position: absolute;
  854. filter: contrast(0) brightness(2);
  855. animation: special-border 0.7s -0.24s infinite linear;
  856. }
  857.  
  858. body.page-user-603563 #block-views-profile-block .field-content > img:nth-child(6) {
  859. position: absolute;
  860. }
  861.  
  862. @keyframes special-border {
  863. 0% {transform: translate(2%, 0) rotateZ(40deg) scale(1.03);}
  864. 100% {transform: translate(2%, 0) rotateZ(400deg) scale(1.03);}
  865. }
  866. `;
  867. document.head.appendChild(styleOverride);
  868. }
  869. }, true);