Labs/Personas/Previewing Code: Difference between revisions

Jump to navigation Jump to search
→‎HTML: add info about data-browsertheme
mNo edit summary
(→‎HTML: add info about data-browsertheme)
 
Line 5: Line 5:
  <img class="preview persona"  
  <img class="preview persona"  
  src="/static/9/5/44495/preview_featured.jpg"  
  src="/static/9/5/44495/preview_featured.jpg"  
  persona="{&quot;id&quot;:&quot;44495&quot;,
  '''persona'''="{&quot;id&quot;:&quot;44495&quot;,
  &quot;name&quot;:&quot;Generation Fame&quot;,
  &quot;name&quot;:&quot;Generation Fame&quot;,
  &quot;accentcolor&quot;:&quot;#663300&quot;,
  &quot;accentcolor&quot;:&quot;#663300&quot;,
Line 21: Line 21:
  }">
  }">


You can copy the JSON blob from any persona on getpersonas.com.  Note that HTML special characters have to be escaped in the JSON record when it is placed inside the <code>persona</code> attribute, although this is not shown in the example above.  For example, the quotation mark, which appears many times in the example above, needs to be escaped to the character entity <code>&amp;quot;</code>.
You can copy the JSON blob from any persona on getpersonas.com.  Note that HTML special characters have to be escaped in the JSON record when it is placed inside the <code>persona</code> attribute, although this is not shown in the example above.  For example, the quotation mark, which appears many times in the example above, needs to be escaped to the character entity <code>&amp;quot;</code>. Note that the attribute name is <code>data-browsertheme</code> for the built-in lightweight theme behavior in Firefox 3.6+.


== JavaScript ==
== JavaScript ==
Confirmed users
933

edits

Navigation menu