Se fuerza a que los enlaces externos abran siempre en una nueva página
This commit is contained in:
parent
d5080bf236
commit
d2df3cf133
3 changed files with 95 additions and 87 deletions
Binary file not shown.
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 196 B |
|
@ -1,4 +1,4 @@
|
|||
if (window.jQuery) {
|
||||
if (window.jQuery) {
|
||||
$(window).load(function(){
|
||||
if (window.devicePixelRatio > 1) {
|
||||
var images = findImagesByRegexp('contacts_thumbnail', document);
|
||||
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Sized thumbnails
|
||||
// Sized thumbnails
|
||||
var images = findImagesByRegexp(/\/attachments\/thumbnail\/\d+\/\d+$/, document)
|
||||
for(var i = 0; i < images.length; i++) {
|
||||
var lowres = images[i].src;
|
||||
|
@ -51,7 +51,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
// People avatars
|
||||
// People avatars
|
||||
var images = findImagesByRegexp(/people\/avatar.*size=\d+$/, document)
|
||||
|
||||
for(var i = 0; i < images.length; i++) {
|
||||
|
@ -60,9 +60,12 @@
|
|||
var highres = lowres.replace(/size=(\d+)$/, "size=" + String(old_size*2));
|
||||
images[i].src = highres;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// External links
|
||||
$("a").filter(function() {
|
||||
return this.hostname && this.hostname !== location.hostname;
|
||||
}).addClass("external").attr("target", "_blank");
|
||||
});
|
||||
} else {
|
||||
document.observe("dom:loaded", function() {
|
||||
|
@ -87,7 +90,6 @@
|
|||
images[i].width = old_size;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -172,6 +172,12 @@ div#activity dt.icon {
|
|||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
div.wiki .external {
|
||||
padding-left: 0;
|
||||
padding-right: 12px;
|
||||
background-position: right 60%;
|
||||
}
|
||||
|
||||
/**********************************************************/
|
||||
/* 2. FONT ICONS */
|
||||
/**********************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue