mirror of
https://github.com/jimeh/modern_bubbling.git
synced 2026-02-19 11:56:38 +00:00
applied Safari 4 fixes
This commit is contained in:
@@ -1,170 +1,171 @@
|
|||||||
/**
|
/**
|
||||||
* reflection.js v1.6
|
* reflection.js v2.0
|
||||||
*
|
* http://cow.neondragon.net/stuff/reflection/
|
||||||
* Contributors: Cow http://cow.neondragon.net
|
* Freely distributable under MIT-style license.
|
||||||
* Gfx http://www.jroller.com/page/gfx/
|
*/
|
||||||
* Sitharus http://www.sitharus.com
|
|
||||||
* Andreas Linde http://www.andreaslinde.de
|
/* From prototype.js */
|
||||||
* Tralala, coder @ http://www.vbulletin.org
|
if (!document.myGetElementsByClassName) {
|
||||||
*
|
document.myGetElementsByClassName = function(className) {
|
||||||
* Freely distributable under MIT-style license.
|
var children = document.getElementsByTagName('*') || document.all;
|
||||||
*/
|
var elements = new Array();
|
||||||
|
|
||||||
/* From prototype.js */
|
for (var i = 0; i < children.length; i++) {
|
||||||
document.getElementsByClassName = function(className) {
|
var child = children[i];
|
||||||
var children = document.getElementsByTagName('*') || document.all;
|
var classNames = child.className.split(' ');
|
||||||
var elements = new Array();
|
for (var j = 0; j < classNames.length; j++) {
|
||||||
|
if (classNames[j] == className) {
|
||||||
for (var i = 0; i < children.length; i++) {
|
elements.push(child);
|
||||||
var child = children[i];
|
break;
|
||||||
var classNames = child.className.split(' ');
|
}
|
||||||
for (var j = 0; j < classNames.length; j++) {
|
}
|
||||||
if (classNames[j] == className) {
|
}
|
||||||
elements.push(child);
|
return elements;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
var Reflection = {
|
||||||
return elements;
|
defaultHeight : 0.5,
|
||||||
}
|
defaultOpacity: 0.5,
|
||||||
|
|
||||||
var Reflection = {
|
add: function(image, options) {
|
||||||
defaultHeight : 0.45,
|
Reflection.remove(image);
|
||||||
defaultOpacity: 0.4,
|
|
||||||
|
doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
|
||||||
add: function(image, options) {
|
if (options) {
|
||||||
Reflection.remove(image);
|
for (var i in doptions) {
|
||||||
|
if (!options[i]) {
|
||||||
doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
|
options[i] = doptions[i];
|
||||||
if (options) {
|
}
|
||||||
for (var i in doptions) {
|
}
|
||||||
if (!options[i]) {
|
} else {
|
||||||
options[i] = doptions[i];
|
options = doptions;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
try {
|
||||||
options = doptions;
|
var d = document.createElement('div');
|
||||||
}
|
var p = image;
|
||||||
|
|
||||||
try {
|
var classes = p.className.split(' ');
|
||||||
var d = document.createElement('div');
|
var newClasses = '';
|
||||||
var p = image;
|
for (j=0;j<classes.length;j++) {
|
||||||
|
if (classes[j] != "reflect") {
|
||||||
var classes = p.className.split(' ');
|
if (newClasses) {
|
||||||
var newClasses = '';
|
newClasses += ' '
|
||||||
for (j=0;j<classes.length;j++) {
|
}
|
||||||
if (classes[j] != "reflect") {
|
|
||||||
if (newClasses) {
|
newClasses += classes[j];
|
||||||
newClasses += ' '
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newClasses += classes[j];
|
var reflectionHeight = Math.floor(p.height*options['height']);
|
||||||
}
|
var divHeight = Math.floor(p.height*(1+options['height']));
|
||||||
}
|
|
||||||
|
var reflectionWidth = p.width;
|
||||||
var reflectionHeight = Math.floor(p.height*options['height']);
|
|
||||||
var divHeight = Math.floor(p.height*(1+options['height']));
|
if (document.all && !window.opera) {
|
||||||
|
/* Fix hyperlinks */
|
||||||
var reflectionWidth = p.width;
|
if(p.parentElement.tagName == 'A') {
|
||||||
|
var d = document.createElement('a');
|
||||||
if (document.all && !window.opera) {
|
d.href = p.parentElement.href;
|
||||||
/* Copy original image's classes & styles to div */
|
}
|
||||||
d.className = newClasses;
|
|
||||||
p.className = 'reflected';
|
/* Copy original image's classes & styles to div */
|
||||||
|
d.className = newClasses;
|
||||||
d.style.cssText = p.style.cssText;
|
p.className = 'reflected';
|
||||||
p.style.cssText = 'vertical-align: bottom';
|
|
||||||
|
d.style.cssText = p.style.cssText;
|
||||||
var reflection = document.createElement('img');
|
p.style.cssText = 'vertical-align: bottom';
|
||||||
reflection.src = p.src;
|
|
||||||
reflection.style.width = reflectionWidth+'px';
|
var reflection = document.createElement('img');
|
||||||
|
reflection.src = p.src;
|
||||||
reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
|
reflection.style.width = reflectionWidth+'px';
|
||||||
reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';
|
reflection.style.display = 'block';
|
||||||
|
reflection.style.height = p.height+"px";
|
||||||
d.style.width = reflectionWidth+'px';
|
|
||||||
d.style.height = divHeight+'px';
|
reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
|
||||||
p.parentNode.replaceChild(d, p);
|
reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';
|
||||||
|
|
||||||
d.appendChild(p);
|
d.style.width = reflectionWidth+'px';
|
||||||
d.appendChild(reflection);
|
d.style.height = divHeight+'px';
|
||||||
} else {
|
p.parentNode.replaceChild(d, p);
|
||||||
var canvas = document.createElement('canvas');
|
|
||||||
if (canvas.getContext) {
|
d.appendChild(p);
|
||||||
/* Copy original image's classes & styles to div */
|
d.appendChild(reflection);
|
||||||
d.className = newClasses;
|
} else {
|
||||||
p.className = 'reflected';
|
var canvas = document.createElement('canvas');
|
||||||
|
if (canvas.getContext) {
|
||||||
d.style.cssText = p.style.cssText;
|
/* Copy original image's classes & styles to div */
|
||||||
p.style.cssText = 'vertical-align: bottom';
|
d.className = newClasses;
|
||||||
|
p.className = 'reflected';
|
||||||
var context = canvas.getContext("2d");
|
|
||||||
|
d.style.cssText = p.style.cssText;
|
||||||
canvas.style.height = reflectionHeight+'px';
|
p.style.cssText = 'vertical-align: bottom';
|
||||||
canvas.style.width = reflectionWidth+'px';
|
|
||||||
canvas.height = reflectionHeight;
|
var context = canvas.getContext("2d");
|
||||||
canvas.width = reflectionWidth;
|
|
||||||
|
canvas.style.height = reflectionHeight+'px';
|
||||||
d.style.width = reflectionWidth+'px';
|
canvas.style.width = reflectionWidth+'px';
|
||||||
d.style.height = divHeight+'px';
|
canvas.height = reflectionHeight;
|
||||||
p.parentNode.replaceChild(d, p);
|
canvas.width = reflectionWidth;
|
||||||
|
|
||||||
d.appendChild(p);
|
d.style.width = reflectionWidth+'px';
|
||||||
d.appendChild(canvas);
|
d.style.height = divHeight+'px';
|
||||||
|
p.parentNode.replaceChild(d, p);
|
||||||
context.save();
|
|
||||||
|
d.appendChild(p);
|
||||||
context.translate(0,image.height-1);
|
d.appendChild(canvas);
|
||||||
context.scale(1,-1);
|
|
||||||
|
context.save();
|
||||||
context.drawImage(image, 0, 0, reflectionWidth, image.height);
|
|
||||||
|
context.translate(0,image.height-1);
|
||||||
context.restore();
|
context.scale(1,-1);
|
||||||
|
|
||||||
context.globalCompositeOperation = "destination-out";
|
context.drawImage(image, 0, 0, reflectionWidth, image.height);
|
||||||
var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);
|
|
||||||
|
context.restore();
|
||||||
gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
|
|
||||||
gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");
|
context.globalCompositeOperation = "destination-out";
|
||||||
|
var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);
|
||||||
context.fillStyle = gradient;
|
|
||||||
if (navigator.appVersion.indexOf('WebKit') != -1) {
|
gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
|
||||||
context.fill();
|
gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");
|
||||||
} else {
|
|
||||||
context.fillRect(0, 0, reflectionWidth, reflectionHeight*2);
|
context.fillStyle = gradient;
|
||||||
}
|
context.rect(0, 0, reflectionWidth, reflectionHeight*2);
|
||||||
}
|
context.fill();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
}
|
||||||
}
|
} catch (e) {
|
||||||
},
|
}
|
||||||
|
},
|
||||||
remove : function(image) {
|
|
||||||
if (image.className == "reflected") {
|
remove : function(image) {
|
||||||
image.className = image.parentNode.className;
|
if (image.className == "reflected") {
|
||||||
image.parentNode.parentNode.replaceChild(image, image.parentNode);
|
image.className = image.parentNode.className;
|
||||||
}
|
image.parentNode.parentNode.replaceChild(image, image.parentNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function addReflections() {
|
|
||||||
var rimages = document.getElementsByClassName('reflect');
|
function addReflections() {
|
||||||
for (i=0;i<rimages.length;i++) {
|
var rimages = document.myGetElementsByClassName('reflect');
|
||||||
var rheight = null;
|
for (i=0;i<rimages.length;i++) {
|
||||||
var ropacity = null;
|
var rheight = null;
|
||||||
|
var ropacity = null;
|
||||||
var classes = rimages[i].className.split(' ');
|
|
||||||
for (j=0;j<classes.length;j++) {
|
var classes = rimages[i].className.split(' ');
|
||||||
if (classes[j].indexOf("rheight") == 0) {
|
for (j=0;j<classes.length;j++) {
|
||||||
var rheight = classes[j].substring(7)/100;
|
if (classes[j].indexOf("rheight") == 0) {
|
||||||
} else if (classes[j].indexOf("ropacity") == 0) {
|
var rheight = classes[j].substring(7)/100;
|
||||||
var ropacity = classes[j].substring(8)/100;
|
} else if (classes[j].indexOf("ropacity") == 0) {
|
||||||
}
|
var ropacity = classes[j].substring(8)/100;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Reflection.add(rimages[i], { height: rheight, opacity : ropacity});
|
|
||||||
}
|
Reflection.add(rimages[i], { height: rheight, opacity : ropacity});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var previousOnload = window.onload;
|
|
||||||
window.onload = function () { if(previousOnload) previousOnload(); addReflections(); }
|
var previousOnload = window.onload;
|
||||||
|
window.onload = function () { if(previousOnload) previousOnload(); addReflections(); }
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Modern Bubbling v1.0 beta 4
|
Modern Bubbling v1.0 beta 7
|
||||||
an Adium Message Style
|
an Adium Message Style
|
||||||
|
|
||||||
Created by Jim Myhrberg (jim@zydev.info).
|
Created by Jim Myhrberg (contact@jimeh.me).
|
||||||
http://blog.zydev.info/category/modern-bubbling/
|
|
||||||
|
|
||||||
Available for download and/or updates at:
|
Available for download and/or updates at:
|
||||||
http://www.adiumxtras.com/index.php?a=xtras&xtra_id=3629
|
http://www.adiumxtras.com/index.php?a=xtras&xtra_id=3629
|
||||||
@@ -23,18 +22,22 @@
|
|||||||
/*@import url("styles/_bubbles/disable-reflection.css");*/
|
/*@import url("styles/_bubbles/disable-reflection.css");*/
|
||||||
|
|
||||||
|
|
||||||
BODY {
|
body {
|
||||||
/* font property used for development only */
|
/* font property used for development only */
|
||||||
/* font: 11px helvetica;*/
|
/* font: 11px helvetica;*/
|
||||||
background: #fff url("images/bg.jpg") bottom repeat-x;
|
background: #fff;
|
||||||
color: #303030;
|
color: #303030;
|
||||||
margin: 8px 10px 8px 10px;
|
margin: 0;
|
||||||
|
z-index: -3
|
||||||
}
|
}
|
||||||
|
|
||||||
#Chat {
|
#Chat {
|
||||||
|
background: transparent url(images/bg.jpg) repeat-x left bottom;
|
||||||
|
padding: 5px 10px 12px 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-bottom: 15px;
|
z-index: -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emoticon {
|
.emoticon {
|
||||||
border-style: none;
|
border-style: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -110,4 +113,3 @@ BODY {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
.message {
|
.message {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 42px;
|
min-height: 42px;
|
||||||
|
z-index: 0;
|
||||||
}
|
}
|
||||||
.message .body {
|
.message .body {
|
||||||
padding: 9px 20px 22px 20px;
|
padding: 9px 20px 22px 20px;
|
||||||
|
|||||||
@@ -1,170 +1,171 @@
|
|||||||
/**
|
/**
|
||||||
* reflection.js v1.6
|
* reflection.js v2.0
|
||||||
*
|
* http://cow.neondragon.net/stuff/reflection/
|
||||||
* Contributors: Cow http://cow.neondragon.net
|
* Freely distributable under MIT-style license.
|
||||||
* Gfx http://www.jroller.com/page/gfx/
|
*/
|
||||||
* Sitharus http://www.sitharus.com
|
|
||||||
* Andreas Linde http://www.andreaslinde.de
|
/* From prototype.js */
|
||||||
* Tralala, coder @ http://www.vbulletin.org
|
if (!document.myGetElementsByClassName) {
|
||||||
*
|
document.myGetElementsByClassName = function(className) {
|
||||||
* Freely distributable under MIT-style license.
|
var children = document.getElementsByTagName('*') || document.all;
|
||||||
*/
|
var elements = new Array();
|
||||||
|
|
||||||
/* From prototype.js */
|
for (var i = 0; i < children.length; i++) {
|
||||||
document.getElementsByClassName = function(className) {
|
var child = children[i];
|
||||||
var children = document.getElementsByTagName('*') || document.all;
|
var classNames = child.className.split(' ');
|
||||||
var elements = new Array();
|
for (var j = 0; j < classNames.length; j++) {
|
||||||
|
if (classNames[j] == className) {
|
||||||
for (var i = 0; i < children.length; i++) {
|
elements.push(child);
|
||||||
var child = children[i];
|
break;
|
||||||
var classNames = child.className.split(' ');
|
}
|
||||||
for (var j = 0; j < classNames.length; j++) {
|
}
|
||||||
if (classNames[j] == className) {
|
}
|
||||||
elements.push(child);
|
return elements;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
var Reflection = {
|
||||||
return elements;
|
defaultHeight : 0.5,
|
||||||
}
|
defaultOpacity: 0.5,
|
||||||
|
|
||||||
var Reflection = {
|
add: function(image, options) {
|
||||||
defaultHeight : 0.45,
|
Reflection.remove(image);
|
||||||
defaultOpacity: 0.4,
|
|
||||||
|
doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
|
||||||
add: function(image, options) {
|
if (options) {
|
||||||
Reflection.remove(image);
|
for (var i in doptions) {
|
||||||
|
if (!options[i]) {
|
||||||
doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
|
options[i] = doptions[i];
|
||||||
if (options) {
|
}
|
||||||
for (var i in doptions) {
|
}
|
||||||
if (!options[i]) {
|
} else {
|
||||||
options[i] = doptions[i];
|
options = doptions;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
try {
|
||||||
options = doptions;
|
var d = document.createElement('div');
|
||||||
}
|
var p = image;
|
||||||
|
|
||||||
try {
|
var classes = p.className.split(' ');
|
||||||
var d = document.createElement('div');
|
var newClasses = '';
|
||||||
var p = image;
|
for (j=0;j<classes.length;j++) {
|
||||||
|
if (classes[j] != "reflect") {
|
||||||
var classes = p.className.split(' ');
|
if (newClasses) {
|
||||||
var newClasses = '';
|
newClasses += ' '
|
||||||
for (j=0;j<classes.length;j++) {
|
}
|
||||||
if (classes[j] != "reflect") {
|
|
||||||
if (newClasses) {
|
newClasses += classes[j];
|
||||||
newClasses += ' '
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newClasses += classes[j];
|
var reflectionHeight = Math.floor(p.height*options['height']);
|
||||||
}
|
var divHeight = Math.floor(p.height*(1+options['height']));
|
||||||
}
|
|
||||||
|
var reflectionWidth = p.width;
|
||||||
var reflectionHeight = Math.floor(p.height*options['height']);
|
|
||||||
var divHeight = Math.floor(p.height*(1+options['height']));
|
if (document.all && !window.opera) {
|
||||||
|
/* Fix hyperlinks */
|
||||||
var reflectionWidth = p.width;
|
if(p.parentElement.tagName == 'A') {
|
||||||
|
var d = document.createElement('a');
|
||||||
if (document.all && !window.opera) {
|
d.href = p.parentElement.href;
|
||||||
/* Copy original image's classes & styles to div */
|
}
|
||||||
d.className = newClasses;
|
|
||||||
p.className = 'reflected';
|
/* Copy original image's classes & styles to div */
|
||||||
|
d.className = newClasses;
|
||||||
d.style.cssText = p.style.cssText;
|
p.className = 'reflected';
|
||||||
p.style.cssText = 'vertical-align: bottom';
|
|
||||||
|
d.style.cssText = p.style.cssText;
|
||||||
var reflection = document.createElement('img');
|
p.style.cssText = 'vertical-align: bottom';
|
||||||
reflection.src = p.src;
|
|
||||||
reflection.style.width = reflectionWidth+'px';
|
var reflection = document.createElement('img');
|
||||||
|
reflection.src = p.src;
|
||||||
reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
|
reflection.style.width = reflectionWidth+'px';
|
||||||
reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';
|
reflection.style.display = 'block';
|
||||||
|
reflection.style.height = p.height+"px";
|
||||||
d.style.width = reflectionWidth+'px';
|
|
||||||
d.style.height = divHeight+'px';
|
reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
|
||||||
p.parentNode.replaceChild(d, p);
|
reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';
|
||||||
|
|
||||||
d.appendChild(p);
|
d.style.width = reflectionWidth+'px';
|
||||||
d.appendChild(reflection);
|
d.style.height = divHeight+'px';
|
||||||
} else {
|
p.parentNode.replaceChild(d, p);
|
||||||
var canvas = document.createElement('canvas');
|
|
||||||
if (canvas.getContext) {
|
d.appendChild(p);
|
||||||
/* Copy original image's classes & styles to div */
|
d.appendChild(reflection);
|
||||||
d.className = newClasses;
|
} else {
|
||||||
p.className = 'reflected';
|
var canvas = document.createElement('canvas');
|
||||||
|
if (canvas.getContext) {
|
||||||
d.style.cssText = p.style.cssText;
|
/* Copy original image's classes & styles to div */
|
||||||
p.style.cssText = 'vertical-align: bottom';
|
d.className = newClasses;
|
||||||
|
p.className = 'reflected';
|
||||||
var context = canvas.getContext("2d");
|
|
||||||
|
d.style.cssText = p.style.cssText;
|
||||||
canvas.style.height = reflectionHeight+'px';
|
p.style.cssText = 'vertical-align: bottom';
|
||||||
canvas.style.width = reflectionWidth+'px';
|
|
||||||
canvas.height = reflectionHeight;
|
var context = canvas.getContext("2d");
|
||||||
canvas.width = reflectionWidth;
|
|
||||||
|
canvas.style.height = reflectionHeight+'px';
|
||||||
d.style.width = reflectionWidth+'px';
|
canvas.style.width = reflectionWidth+'px';
|
||||||
d.style.height = divHeight+'px';
|
canvas.height = reflectionHeight;
|
||||||
p.parentNode.replaceChild(d, p);
|
canvas.width = reflectionWidth;
|
||||||
|
|
||||||
d.appendChild(p);
|
d.style.width = reflectionWidth+'px';
|
||||||
d.appendChild(canvas);
|
d.style.height = divHeight+'px';
|
||||||
|
p.parentNode.replaceChild(d, p);
|
||||||
context.save();
|
|
||||||
|
d.appendChild(p);
|
||||||
context.translate(0,image.height-1);
|
d.appendChild(canvas);
|
||||||
context.scale(1,-1);
|
|
||||||
|
context.save();
|
||||||
context.drawImage(image, 0, 0, reflectionWidth, image.height);
|
|
||||||
|
context.translate(0,image.height-1);
|
||||||
context.restore();
|
context.scale(1,-1);
|
||||||
|
|
||||||
context.globalCompositeOperation = "destination-out";
|
context.drawImage(image, 0, 0, reflectionWidth, image.height);
|
||||||
var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);
|
|
||||||
|
context.restore();
|
||||||
gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
|
|
||||||
gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");
|
context.globalCompositeOperation = "destination-out";
|
||||||
|
var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);
|
||||||
context.fillStyle = gradient;
|
|
||||||
if (navigator.appVersion.indexOf('WebKit') != -1) {
|
gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
|
||||||
context.fill();
|
gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");
|
||||||
} else {
|
|
||||||
context.fillRect(0, 0, reflectionWidth, reflectionHeight*2);
|
context.fillStyle = gradient;
|
||||||
}
|
context.rect(0, 0, reflectionWidth, reflectionHeight*2);
|
||||||
}
|
context.fill();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
}
|
||||||
}
|
} catch (e) {
|
||||||
},
|
}
|
||||||
|
},
|
||||||
remove : function(image) {
|
|
||||||
if (image.className == "reflected") {
|
remove : function(image) {
|
||||||
image.className = image.parentNode.className;
|
if (image.className == "reflected") {
|
||||||
image.parentNode.parentNode.replaceChild(image, image.parentNode);
|
image.className = image.parentNode.className;
|
||||||
}
|
image.parentNode.parentNode.replaceChild(image, image.parentNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function addReflections() {
|
|
||||||
var rimages = document.getElementsByClassName('reflect');
|
function addReflections() {
|
||||||
for (i=0;i<rimages.length;i++) {
|
var rimages = document.myGetElementsByClassName('reflect');
|
||||||
var rheight = null;
|
for (i=0;i<rimages.length;i++) {
|
||||||
var ropacity = null;
|
var rheight = null;
|
||||||
|
var ropacity = null;
|
||||||
var classes = rimages[i].className.split(' ');
|
|
||||||
for (j=0;j<classes.length;j++) {
|
var classes = rimages[i].className.split(' ');
|
||||||
if (classes[j].indexOf("rheight") == 0) {
|
for (j=0;j<classes.length;j++) {
|
||||||
var rheight = classes[j].substring(7)/100;
|
if (classes[j].indexOf("rheight") == 0) {
|
||||||
} else if (classes[j].indexOf("ropacity") == 0) {
|
var rheight = classes[j].substring(7)/100;
|
||||||
var ropacity = classes[j].substring(8)/100;
|
} else if (classes[j].indexOf("ropacity") == 0) {
|
||||||
}
|
var ropacity = classes[j].substring(8)/100;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Reflection.add(rimages[i], { height: rheight, opacity : ropacity});
|
|
||||||
}
|
Reflection.add(rimages[i], { height: rheight, opacity : ropacity});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var previousOnload = window.onload;
|
|
||||||
window.onload = function () { if(previousOnload) previousOnload(); addReflections(); }
|
var previousOnload = window.onload;
|
||||||
|
window.onload = function () { if(previousOnload) previousOnload(); addReflections(); }
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Modern Bubbling v1.0 beta 4
|
Modern Bubbling v1.0 beta 7
|
||||||
an Adium Message Style
|
an Adium Message Style
|
||||||
|
|
||||||
Created by Jim Myhrberg (jim@zydev.info).
|
Created by Jim Myhrberg (contact@jimeh.me).
|
||||||
http://blog.zydev.info/category/modern-bubbling/
|
|
||||||
|
|
||||||
Available for download and/or updates at:
|
Available for download and/or updates at:
|
||||||
http://www.adiumxtras.com/index.php?a=xtras&xtra_id=3629
|
http://www.adiumxtras.com/index.php?a=xtras&xtra_id=3629
|
||||||
@@ -23,18 +22,22 @@
|
|||||||
/*@import url("styles/_bubbles/disable-reflection.css");*/
|
/*@import url("styles/_bubbles/disable-reflection.css");*/
|
||||||
|
|
||||||
|
|
||||||
BODY {
|
body {
|
||||||
/* font property used for development only */
|
/* font property used for development only */
|
||||||
/* font: 11px helvetica;*/
|
/* font: 11px helvetica;*/
|
||||||
background: #fff url("images/bg.jpg") bottom repeat-x;
|
background: #fff;
|
||||||
color: #303030;
|
color: #303030;
|
||||||
margin: 8px 10px 8px 10px;
|
margin: 0;
|
||||||
|
z-index: -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Chat {
|
#Chat {
|
||||||
|
background: transparent url(images/bg.jpg) repeat-x left bottom;
|
||||||
|
padding: 5px 10px 12px 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-bottom: 15px;
|
z-index: -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emoticon {
|
.emoticon {
|
||||||
border-style: none;
|
border-style: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -110,4 +113,3 @@ BODY {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
.message {
|
.message {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 42px;
|
min-height: 42px;
|
||||||
|
z-index: 0;
|
||||||
}
|
}
|
||||||
.message .body {
|
.message .body {
|
||||||
padding: 9px 20px 22px 20px;
|
padding: 9px 20px 22px 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user