Skip to content

how to set up the background image? #1

Closed

Description

@benedicti0n
No description provided.

Activity

  1. Storm99999 commented on Dec 14, 2023

    @Storm99999
    Owner

    You have to reference your own CSS links, to do that you have to create your own theme_list.json file and replace it in the GPP Tampermonkey script. Or you can inject the CSS seperately.

    But, if you don't want to do that, just inject this through either the developer tools console or Tampermonkey:

    // Get the head element of the document
    var head = document.head || document.getElementsByTagName('head')[0];
    
    // Create a style element
    var style = document.createElement('style');
    style.type = 'text/css';
    
    var css = `
        body::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 0;
            background: url('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/Storm99999/githubpp/blob/main/img/lovely.jpg?raw=true') center/cover no-repeat;
            filter: blur(20px); /* Adjust the blur amount as needed */
        }
    
        body {
            margin: 0;
            padding: 0;
        }
    `;
    
    style.appendChild(document.createTextNode(css));
    
    head.appendChild(style);
    var container = document.querySelector('.Box.mt-4');
    
    if (container) {
        container.style = 'background: transparent;';
        var elementsInsideContainer = container.querySelectorAll('*');
        elementsInsideContainer.forEach(function(element) {
            element.style = 'color: white';
        });
    }
  2. pinned this issue on Dec 14, 2023
  3. benedicti0n commented on Dec 15, 2023

    @benedicti0n
    Author

    it worked! thank you so much <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions