View AND_OR_NOT
#AND | |
<b:if cond='data:blog.pageType == "index"'> | |
<b:if cond='data:blog.searchQuery'> | |
<!--search_page AND index_page--> | |
</b:if> | |
</b:if> | |
#OR |
View linkify.js
<script type='text/javascript'> | |
//<![CDATA[ | |
(function($){ | |
var url1 = /(^|<|\s)(www\..+?\..+?)(\s|>|$)/g, | |
url2 = /(^|<|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|>|$)/g, | |
linkifyThis = function () { | |
var childNodes = this.childNodes, | |
i = childNodes.length; |
View full_image_vanilla_js_mn.js
<script type='text/javascript'> | |
//<![CDATA[ | |
document.addEventListener("DOMContentLoaded",function(){var h=/\/s\B\d{2,4}/,g=document.getElementsByClassName("post-body")[0].offsetWidth,a=document.querySelectorAll(".post-body table");if("undefined"!=typeof a&&null!==a)for(var b=a.length;b--;){var d=a[b],c=document.createElement("div");c.setAttribute("class","separator");var e=document.createElement("div");e.style.textAlign="center";var f=a[b].querySelector("a").cloneNode(!0);c.appendChild(f);d.parentNode.replaceChild(c,d);a[b].querySelector(".tr-caption")&& | |
(d=a[b].querySelector(".tr-caption").innerText||a[b].querySelector(".tr-caption").textContent,e.innerHTML=d,c.appendChild(e))}a=document.querySelectorAll(".post-body img");for(b=a.length;b--;)c=a[b].height,e=a[b].width,d=Math.round(g/(e/c)),f="",f=e>=c?g:d,c=a[b].getAttribute("src").replace(h,"/s"+f),a[b].removeAttribute("width"),a[b].removeAttribute("height"),a[b].parentNode.removeAttribute("style"),a[b].style.marginLeft="0",a[b].style.padding="0",a[b].style |
View script_jquery.js
<script type="text/javascript"> | |
//<![CDATA[ | |
$(document).ready(function() { | |
var postWidth = $('.post-body').width(); | |
var sAttribut = /\/s\B\d{2,4}/; | |
$('.post-body').find('img').each(function(n, image) { | |
var thisHeight = $(this).height(); | |
var thisWidth = $(this).width(); | |
var thisRatio = thisWidth / thisHeight; | |
var newWidth = postWidth; |
View script_full_image_vanilla_js.js
<script type="text/javascript"> | |
//<![CDATA[ | |
document.addEventListener('DOMContentLoaded', function() { | |
var sAttribut = /\/s\B\d{2,4}/; | |
var postWidth = document.getElementsByClassName('post-body')[0].offsetWidth; | |
var table = document.querySelectorAll('.post-body table'); | |
if (typeof(table) != 'undefined' && table !== null) { | |
var n = table.length; | |
while (n--) { | |
var oldNode = table[n]; |
View image_full.js
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
$(document).ready(function() { | |
var postWidth = $('.post-body').width(); | |
var sAttribut = /\/s\B\d{2,4}/; | |
$('.post-body').find('table').each(function() { | |
$(this).find('a').unwrap().unwrap(); | |
$(this).find('.tr-caption').unwrap(); | |
$(this).replaceWith($('table').html() |
View resizeImage.css
.post-body img { | |
width: $(content.width); | |
height: auto; | |
margin-left: -1em; | |
padding: 0; | |
border: none; | |
max-width: 100%; | |
} | |
.post-body .tr-caption-container { |
View resizeImage.js
<script language='javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'/> | |
<script type='text/javascript'> | |
//<![CDATA[ | |
$(document).ready(function() { | |
$.fn.resizeImage = function() { | |
$('.post-body').table_to_div(); | |
var postWidth = $('.post-body').width(); | |
var sAttribut = /\/s\B\d{2,4}/; | |
$('.post-body').find('img').each(function(n, image){ |
View gist:8164086
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<style> | |
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; |
NewerOlder