PNL
    • Tags
    • Popular
    • Sharing
    • Captionz Trove
    • Users
    • Captionz
    • PDF Reader
    • PNL Pro
    • Register
    • Login

    How to add site customization to PNL Reader
    Add to Dictionariez
    Add to PNL Reader

    Reader Trove
    pnl-reader pnl
    1
    1
    13
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • riverR
      river
      last edited by river

      How to Customize a site

      Site customization lets you tell PNL Reader exactly how to extract content from any website. When the default reader mode doesn't work well on a site, you can create your own configuration.

      Getting Started

      1. Open PNL Reader extension menu
      2. Click Site Customization in the settings dropdown
      3. Fill in the form and click Save Customization

      Configuration Schema

      Here's what each field does:

      Required Fields

      name

      A friendly name for your customization. This helps you identify it later.

      Example: "Reddit Posts and Comments"
      

      urlMatch

      A URL pattern to match. Can be a simple string or a regular expression.

      Simple string (easiest):

      "https://example.com/articles/"
      

      This matches any URL that contains https://example.com/articles/.

      Regular expression (more powerful):

      "https://www.reddit.com/r/\\w+/comments/\\w+/.*"
      

      This matches any Reddit post URL using regex patterns.

      Regex tips (optional):

      • Use \\d+ to match numbers
      • Use [^/]+ to match any characters except /
      • Use .* to match anything
      • Escape special characters like . with \\.

      Article Settings (Optional)

      These fields tell PNL Reader where to find the article content.

      article.content

      CSS selector(s) for the main content. This is the most important field.

      Single selector: "#chapter-content"
      Multiple selectors: [".post-body", ".comments"]
      

      When you use multiple selectors, content from all matching elements is combined in order.

      article.title

      CSS selector for the article title.

      Example: "h1.post-title"
      

      article.byline

      CSS selector for author information.

      Example: "a[href*='/user/']"
      

      article.publishedTime

      CSS selector for the publish date/time.

      Example: "time[datetime]"
      

      article.excludes

      CSS selectors for elements to remove from the content. Useful for hiding ads, share buttons, or other clutter.

      Example: [".ads", ".share-buttons", ".sidebar"]
      

      Navigation Settings (Optional)

      Enable previous/next page navigation for multi-page articles.

      navigation.previous

      CSS selector for the "previous page" link.

      Example: "a.prev-chapter"
      

      navigation.next

      CSS selector for the "next page" link.

      Example: "a.next-chapter"
      

      Custom CSS (Optional)

      css

      Add custom styles for the extracted content. These styles are applied in reader mode.

      /* Style comments */
      .comment {
        border-left: 2px dashed var(--pico-muted-border-color);
        padding-left: 1em;
        margin: 1em 0;
      }
      
      /* Highlight author names */
      .author {
        font-weight: bold;
        color: var(--pico-primary);
      }
      

      Available CSS variables:

      • --pico-primary - Primary accent color
      • --pico-muted-color - Muted text color
      • --pico-muted-border-color - Muted border color
      • --pico-background-color - Background color
      • --pnl-reader-line-height - Current line height setting

      Examples

      Simple Example: NovelFull

      {
        "name": "NovelFull Chapters",
        "urlMatch": "https://novelfull.com/[^/]+/[^/]+\\.html$",
        "article": {
          "content": "#chapter-content",
          "title": "a.chapter-title",
          "excludes": ["div"]
        }
      }
      

      Complex Example: Reddit

      For a more advanced example with custom CSS styling, see Site Customization - Reddit Posts and Comments.


      How to Find the Right Selectors

      1. Open the website you want to customize
      2. Right-click on the content you want to extract
      3. Click Inspect to open Developer Tools
      4. Look at the HTML structure and find unique selectors

      Tips:

      • Use IDs when available (#main-content)
      • Use class names (.article-body)
      • Use attribute selectors ([data-type="post"])
      • Combine selectors for specificity (article .content p)

      Share Your Customization

      Made a great customization? Share it with the community!

      1. Fill in your configuration in the Site Customization page
      2. Click Share at pnl.dev
      3. Review and submit your post

      Your configuration will be available at Reader Trove for others to use.

      Formatting tips:

      When sharing, your configuration is wrapped in a JSON code block. If you have custom CSS, it's better to put it in a separate CSS code block rather than inline in the JSON. This makes it easier to read and edit:

      ### Configuration
      
      ```json
      {
        "name": "My Site",
        "urlMatch": "https://example.com/",
        "article": {
          "content": ".article-body"
        }
      }
      ```
      
      ### Custom CSS
      
      ```css
      .comment {
        border-left: 2px solid #ccc;
        padding-left: 1em;
      }
      ```
      

      The Share at pnl.dev button does this automatically for you.


      Need Help?

      Creating customizations can be tricky. Don't hesitate to:

      • Ask questions at pnl.dev/category/3/feedback
      • Browse existing configurations at Reader Trove
      • Report issues if something doesn't work as expected

      The community is here to help. Every question helps improve PNL Reader for everyone.

      Happy reading! đź“–

      An atypical programmer making apps for educational purpose.

      1 Reply Last reply Reply Quote 1
      • riverR river pinned this topic
      • First post
        Last post
      Popular topics
      • Add skip or change word
        W
        wkhn66
        1
        8
        88

      • Google Translate English -> Romanian
        D
        danygh95
        1
        5
        72

      • Deepseek - definition
        D
        danygh95
        1
        2
        32

      • Dexonline Romanian Definition
        riverR
        river
        1
        2
        38

      • Please fix the Palestinian flag, it is incorrect.
        Bobby LeeB
        Bobby Lee
        2
        2
        156

      • N.B. More Languages and Pronunciations come to Dictionariez/Ordböcker v7.3.0
        riverR
        river
        0
        2
        260

      • Site Customization - NovelFull Chapters
        riverR
        river
        0
        1
        12

      • Site Customization - Wattpad Stories
        riverR
        river
        0
        1
        10
      Buy Me A Coffee Support me!
      Powered by pnlpal open-source | Based on NodeBB