Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use HTML5 compliant datalist attribute instead of rel #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Source/mediaboxAdv.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ Browser.Plugins.QuickTime = (function(){
} else {
try { var test = new ActiveXObject('QuickTime.QuickTime'); }
catch(e) {}

if (test) { return true; }
}
return false;
Expand All @@ -956,13 +956,12 @@ Mediabox.scanPage = function() {
// if (Browser.Platform.ios && !(navigator.userAgent.match(/iPad/i))) return; // this quits the process if the visitor is using a non-iPad iOS device (iPhone or iPod Touch)
// $$('#mb_').each(function(hide) { hide.set('display', 'none'); });
var links = $$("a").filter(function(el) {
return el.rel && el.rel.test(/^lightbox/i);
return el.getAttribute('data-mediabox') !== null;
});
// $$(links).mediabox({/* Put custom options here */}, null, function(el) {
links.mediabox({/* Put custom options here */}, null, function(el) {
var rel0 = this.rel.replace(/[[]|]/gi," ");
var relsize = rel0.split(" ");
return (this == el) || ((this.rel.length > 8) && el.rel.match(relsize[1]));
var data = this.getAttribute('data-mediabox').split(' ');
return (this == el) || el.getAttribute('data-mediabox').match(data[0]);
});
};

Expand Down