Procházet zdrojové kódy

add translate attributes

Gregg Tavares před 5 roky
rodič
revize
5c52e7f38a

+ 1 - 1
build/templates/example.template

@@ -1,4 +1,4 @@
-<div class="threejs_example_container">
+<div translate="no" class="threejs_example_container">
   <div><iframe class="threejs_example" style="{{width}} {{height}}" src="/threejs/resources/editor.html?url={{{examplePath}}}{{{encodedUrl}}}{{{params}}}"></iframe></div>
   <a class="threejs_center" href="{{{examplePath}}}{{{url}}}" target="_blank">{{{caption}}}</a>
 </div>

+ 5 - 1
threejs/lessons/resources/lesson.js

@@ -355,11 +355,15 @@ $(document).ready(function($){
   $('pre>code')
     .unwrap()
     .replaceWith(function() {
-      return $('<pre class="prettyprint showlinemods">' + this.innerHTML + '</pre>');
+      return $('<pre class="prettyprint showlinemods" translate="no">' + this.innerHTML + '</pre>');
     });
   if (window.prettyPrint) {
     window.prettyPrint();
   }
+  $('span[class=com]')
+    .replaceWith(function() {
+      return $('<span class="com" translate="yes">' + this.innerHTML + '</span>');
+    });
 
   const params = getQueryParams();
   if (params.doubleSpace || params.doublespace) {