Title: llms-inline-header-scripts
Last modified: February 13, 2025

---

# llms-inline-header-scripts

 *  Resolved [msharrison1971](https://wordpress.org/support/users/msharrison1971/)
 * (@msharrison1971)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/llms-inline-header-scripts/)
 * Hello, recently installed LifterLMS on our site and still evaluating the product.
   The site owner noticed he’s unable to copy/paste text from the site. After digging
   in the page source, I found a script entitled “llms-inline-header-scripts” containing
   functionality to prevent copy/pasting outside of input/textareas. I figured this
   was part of the main LifterLMS plugin, so disabled the plugin and the script 
   disappears. Here’s the script:
 *     ```wp-block-code
       <script id="llms-inline-header-scripts" type="text/javascript"> ( function(){ function dispatchEvent( type ) { document.dispatchEvent( new Event( type ) ); } document.addEventListener( 'copy', function( event ) { // Allow copying if the target is an input or textarea element if (event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA') { return; // Let the default copy behavior proceed } // Prevent copying outside input/textarea elements event.preventDefault(); event.clipboardData.setData( 'text/plain', 'Copying is not allowed.' ); dispatchEvent( 'llms-copy-prevented' ); }, false ); document.addEventListener( 'contextmenu', function( event ) { // Prevent right-click context menu on images if ( event.target && 'IMG' === event.target.nodeName ) { event.preventDefault(); dispatchEvent( 'llms-context-prevented' ); } }, false ); } )(); </script>
       ```
   
 * I appreciate why this functionality is there, but I would prefer to restrict 
   this to the training course pages, rather than the entire site. Does anyone know
   if this is possible?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fllms-inline-header-scripts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Nick Mariano](https://wordpress.org/support/users/reddotinmotion/)
 * (@reddotinmotion)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/llms-inline-header-scripts/#post-18304630)
 * Hi [@msharrison1971](https://wordpress.org/support/users/msharrison1971/),
   What
   you are describing here is the content protection feature of LifterLMS. It can
   be enabled or disabled by following the instructions in [lifterlms.com/docs/content-protection-feature-prevent-copying-of-content](https://lifterlms.com/docs/content-protection-feature-prevent-copying-of-content/).
   You are correct, however, that this content protection applies to the entire 
   site. We do have an existing feature request to enable/disable content protection
   based on post types. So, for example, you may want to enable content protection
   only for the course and lesson post types, but have it disabled for all other
   post types. In this case, you can find that feature request by following the 
   instructions in [lifterlms.com/docs/how-does-lifterlms-handle-feature-requests/#before-submitting](https://lifterlms.com/docs/how-does-lifterlms-handle-feature-requests/#before-submitting)
   and searching for `"Content protection enabled on specific post types, but not
   others"`.
 *  Thread Starter [msharrison1971](https://wordpress.org/support/users/msharrison1971/)
 * (@msharrison1971)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/llms-inline-header-scripts/#post-18306801)
 * thanks Nick – that’s resolved the issue

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘llms-inline-header-scripts’ is closed to new replies.

 * ![](https://ps.w.org/lifterlms/assets/icon.svg?rev=2034507)
 * [LifterLMS - WP LMS for eLearning, Online Courses, & Quizzes](https://wordpress.org/plugins/lifterlms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lifterlms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lifterlms/)
 * [Active Topics](https://wordpress.org/support/plugin/lifterlms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lifterlms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lifterlms/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [msharrison1971](https://wordpress.org/support/users/msharrison1971/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/llms-inline-header-scripts/#post-18306801)
 * Status: resolved