How to set copy prevention for H5P content on drupal?

Dear Friends,

I used H5P to create question on quiz module in drupal. I used drupal module copyprevention in my site. It work find with drupal content. But it not working with H5P content.

So, I modified the file sites/all/modules/h5p/library/embed.php

<head>

<SCRIPT LANGUAGE="JavaScript"> 

var message="";

function clickIE() {if (document.all) {(message);return false;}}

function clickNS(e) {if

(document.layers||(document.getElementById&&!document.all)) {

if (e.which==2||e.which==3) {(message);return false;}}}

if (document.layers)

{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}

else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false");

document.onselectstart=new Function("return false");

// -->

</SCRIPT>

<style type="text/css">

#test

{

-webkit-user-select: none;

-khtml-user-select: none;

-moz-user-select: none;

-ms-user-select: none;

-o-user-select: none;

user-select: none;

}

</style>

</head>

<body id="copyprotect"  onMouseUp="return false;" onMouseDown="return false;" onselectstart="return false;" onselectstart="return false;">

I clear cache and refresh the website and see the html code. But, it didn't change.

How to set copy prevention for H5P content?

Thank you so much,

Bien

falcon's picture

I believe embed.php is only used for external embed. I think you'll have to make changes to the module itself _include_h5p in order to get it for H5P content embedded in iframes internally on your site. H5P uses iframes to get rid of the site's css.

Feel free to contibute patches that will allow changing this without changing the module itself, for instance theming support or a hook.

(By the way not sure what you mean by "see the html code. But, it didn't change.", I assume it means that you were unable to see your code changes.)