Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add mobile skip to external links
- $('.page').live('pageAnimationStart', function(){
- $("a[target='_blank']").each(function() {
- if (!$(this).attr('href').match(/slideshow/) and !$(this).attr('href').match(/mobile=skip/)) {
- // Link with params
- if ($(this).attr('href').match(/\?/)) {
- $(this).attr('href', $(this).attr('href') + "&mobile=skip");
- // Link with no params
- } else {
- $(this).attr('href', $(this).attr('href') + "?mobile=skip");
- }
- }
- });
- });
Add Comment
Please, Sign In to add comment