/usr/share/javascript/slimbox/fix-urls.js is in libjs-slimbox 2.04-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /*
The following code is identical to the default autoload code block,
excepted that it will automatically fix URLs containing invalid characters.
Some people use invalid characters like whitespaces, parenthesis or quotes in their image URLs.
Slimbox does not work correctly with these characters, as explained in the FAQ. It's NOT a bug.
The right solution is to fix the URLs by replacing these invalid characters
with URL-encoded entities, so that they respect the standards.
However if you are lazy and want the javascript to fix them for you before passing them to Slimbox,
then replace the default autoload code block with this one.
*/
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
jQuery(function($) {
$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, function(el) {
return [encodeURI(el.href), el.title];
}, function(el) {
return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
});
});
}
|