• Resolved dalpho

    (@dalpho)


    activate plugins on selected pages
    Hi, congratulations on your work.
    I am testing your plugin on xampp and it seems to work fine, the only thing I don’t like is that I can’t select the page where to use it, and therefore I have the code of this plugin even in pages where there is no video.
    how can i disable in unused pages?
    A tip for the next update you could put in the panel of the article page together where you choose the quality a check to choose whether or not to activate the plugin on that page or article so as not to load css and javascript unnecessary.
    thank you

Viewing 1 replies (of 1 total)
  • Plugin Author kevinweber

    (@kevinweber)

    Hi @dalpho, have you tried turning on the “Only load CSS/JS when needed” checkbox? It’s the first option in the plugin’s admin panel. When checked, the scripts should only load for posts with an oembed script in it. Unfortunately, if your post embeds any other type of oembed (e.g. a SoundCloud player), the scripts will still be loaded if if there’s no Youtube oembed.

    [FYI: I just realized the latter, and inspired by this I already implemented a change to only load the correct scripts if Youtube and/or Vimeo embeds are present. I’ll publish that change in a few days; you can look forward to v2.11, or you can already download the updated code from Github: https://github.com/kevinweber/lazy-load-for-videos%5D

Viewing 1 replies (of 1 total)

The topic ‘activate plugin in specific page’ is closed to new replies.