|
|
| (Aynı kullanıcının aradaki diğer 5 değişikliği gösterilmiyor) |
| 1. satır: |
1. satır: |
| /* Pepuk Cafe Projector Mode */
| |
| (function () {
| |
| function getParam(name) {
| |
| var match = new RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
| |
| return match ? decodeURIComponent(match[1].replace(/\+/g, ' ')) : null;
| |
| }
| |
|
| |
|
| var mode = getParam('pepuk_projecteur');
| |
| var storageKey = 'pepukProjecteur';
| |
| var randomPath = '/index.php/%C3%96zel:Rastgele';
| |
| var rotateDelayMs = 300000;
| |
|
| |
| if (mode === '1') {
| |
| try {
| |
| localStorage.setItem(storageKey, '1');
| |
| } catch (e) {}
| |
| }
| |
|
| |
| if (mode === '0') {
| |
| try {
| |
| localStorage.removeItem(storageKey);
| |
| } catch (e) {}
| |
| return;
| |
| }
| |
|
| |
| var active = false;
| |
|
| |
| try {
| |
| active = localStorage.getItem(storageKey) === '1';
| |
| } catch (e) {}
| |
|
| |
| if (!active) {
| |
| return;
| |
| }
| |
|
| |
| function applyProjectorMode() {
| |
| var style = document.createElement('style');
| |
| style.id = 'pepuk-projecteur-style';
| |
| style.textContent = [
| |
| 'html, body { background: #101418 !important; color: #f4ead7 !important; overflow-x: hidden !important; }',
| |
| '#mw-panel, #p-logo, #p-personal, #footer, #mw-head, #left-navigation, #right-navigation, .vector-header-container, .vector-page-toolbar, .vector-sticky-header, .mw-editsection, .catlinks, .printfooter, .mw-indicators, .mw-jump, .mw-portlet, .vector-column-end, .page-actions, .mw-footer, .vector-page-tools-landmark { display: none !important; }',
| |
| '#content, .mw-body, .vector-body, .vector-page-titlebar, .mw-parser-output { margin: 0 !important; max-width: none !important; width: auto !important; }',
| |
| '#content, .mw-body, .vector-body { background: #f6eddc !important; color: #201a16 !important; padding: 2.4rem 3rem !important; box-sizing: border-box !important; }',
| |
| 'body, #content, .mw-body, .vector-body { font-size: 145% !important; line-height: 1.5 !important; }',
| |
| '#mw-content-text, .mw-parser-output p, .mw-parser-output li, .mw-parser-output dd, .mw-parser-output blockquote, .mw-parser-output td, .mw-parser-output th { font-size: 1em !important; line-height: 1.55 !important; }',
| |
| '.mw-page-container, .vector-sitenotice-container, .vector-main-menu-container, .vector-column-start, .vector-column-center, .vector-body-before-content { max-width: none !important; margin: 0 !important; padding: 0 !important; }',
| |
| 'a { color: #7a2d12 !important; }'
| |
| ].join('\n');
| |
|
| |
| if (!document.getElementById(style.id)) {
| |
| document.head.appendChild(style);
| |
| }
| |
| }
| |
|
| |
| if (document.readyState === 'loading') {
| |
| document.addEventListener('DOMContentLoaded', applyProjectorMode, { once: true });
| |
| } else {
| |
| applyProjectorMode();
| |
| }
| |
|
| |
| setTimeout(function () {
| |
| window.location.href = randomPath + '?pepuk_time=' + Date.now();
| |
| }, rotateDelayMs);
| |
| }());
| |