urich tables fix for notion rtl

fixing notion table RTL

Tính đến 06-10-2024. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         urich tables fix for notion rtl
// @namespace    http://tampermonkey.net/
// @version      2024-10-06
// @description  fixing notion table RTL
// @author       You
// @match        https://www.notion.so/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=notion.so
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    var UC_addStyle =
        function(css) {
            var style = document.getElementById("GM_addStyleBy8626") || (function() {
                var style = document.createElement('style');
                style.type = 'text/css';
                style.id = "GM_addStyleBy8626";
                document.head.appendChild(style);
                return style;
            })();
            var sheet = style.sheet;
            sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length);
        };

    UC_addStyle(".notion-table-view-row { text-align: start !important; direction: rtl }");
    UC_addStyle(".notion-table-view-row * { text-align: start !important; direction: rtl }");
    UC_addStyle(".notion-list-view *[dir=ltr] { text-align: start !important; direction: rtl }");
    UC_addStyle(".notion-table-view-header-row *[dir=ltr] { text-align: start !important; direction: rtl }");
    UC_addStyle(".notion-table-view-header-row { text-align: start !important; direction: rtl }");
    // Your code here...
})();