disabling prettyPhoto on mobile - mobile

I may be too much of a noob to be asking here, but I've gotten a lot of help with other issues by searching here and finding others Q&A's, so am going to try my own.
The short version of what I'm looking for is a way to disable prettyPhoto on small mobile screens (phones, not tablets) - or maybe even better to just disable the caption ("title" text) when on phones only.
Originally, I wasn't able to get prettyPhoto to open when viewed on the phone. I fixed that with this solution: (I'm not allowed to post the link since this is my first post - but the bitly address is 10tsboq)
But now the caption ("title" text in the code) forms a long vertical string as shown here: http://grab.by/j9f0
I did find this solution posted to disable prettyPhoto altogether on phones using Modernizr, http://forums.no-margin-for-errors.com/discussion/5282/pretty-photo-on-a-mobile-device-iphone#Item_7 but either I'm not understanding where to put the code or I've just done it wrong. Anyone know where that code should go? (just tacked on at the bottom of the prettyPhoto js or css? Or replacing something existing in the code? Or somewhere else altogether?
Or - any other completely different suggestions to solve the issue?
(by the way, I'm working on a Squarespace v6 platform for the site, in case that matters)
Thanks!

for anyone looking for the answer to this, I tracked down a commenter on the original post and they were super cool about being willing to answer a strangers email to offer explanation - so, to answer the question I had posed on the modernizr script - it goes into the prettyPhoto code that is most likely in your footer:
(something like this):
<script type="text/javascript" charset="utf-8">
  $(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto();
INSERT MODERNIZR MQ CODE HERE
  });
</script>
hope that helps someone!

Related

What obfuscation is this?

I am currently a student working on a topic related to internet links and found this :
https://verinfopaypai.com/
When I put this set on the browser's search bar or when I copy it paste here it puts a link:
https://verinfopaypai.com/
This link is not mine and I am not linked to this link, I stumbled upon it by chance.
Is there any way to find out what obfuscation it is?
Thank you for your help
This isn't really obfuscation it's simply html entity encoding.
Each &#{number}; block represents a character in html.
You can see more about this here. https://mothereff.in/html-entities

Can we use gauge/gage in Ionic ? (Cordova)

This is my first post here, so I'm sorry if I'm not in the good section.
My "simple" question is, can we add a gage/gauge (I don't now the exact english spelling), in a Ionic project ?
A thing like that:
https://www.youtube.com/watch?v=w2qrYL0Le24
Or an other exemple:
http://crisbeto.github.io/angular-svg-round-progressbar/
I already tried to insert gauge like that in my project but the gauge never appears, so please, can you help me ?
(The goal is to show to an user a speed for exemple or the batterie life of his smartphone, any importance, juste a jauge who can be incremented or decremented)
Can you explain me please how it works, for example via a Codepen or anything else. I had already tried to search response but I solve anything on that.
I'm french and I am sorry for my language, but thanks in advance for you'r help !
Thanks.
I was able to get this to work:
https://github.com/frapontillo/angular-gage
You must also have the JustGage library and Raphael. Take a look at the example to see it in action. I was able to even make it work in the http://creator.ionic.io app by adding the scripts of angular-gage, JustGage and Raphael (just add a js and paste in the scripts).

ui-router and angular-translate working together

I read different SO posts and blog posts about that question but none of them answered my questions.
Here's what I have:
Angular-translate is activated to find the preferred language, store it in localstorage/cookie and use that to translate the page.
Most people are trying to do this the other way around: someone enters a URL like domain.com/en/pagename.
I do not care about the locale in the url (although it can be there, i really don't care).
Here is what I'm trying to do:
But an important thing would be to translate the title in there for SEO and user-friendly purposes. Having:
domain.com/find-a-car/
domain.com/trouver-une-voiture/
domain.com/ein-auto-finden/
or
domain.com/en/find-a-car/
domain.com/fr/trouver-une-voiture/
domain.com/de/ein-auto-finden/
Any suggestions to achieve that ? Knowing that the page title should be dynamic, coming from the locale-??.json files !

Button does not work on some mobile devices (eg iPhone6, Androids)

this is my first question here and I was adviced to place this topic here.
I got a responsive website based on the AURA (PI-)theme. For the xs2 breakpoint I do show another slideshow on the homepage, where I have placed an button as call to action (other button type didn't work either)
On older smartphones like iPhone4 and 5 it is working. But on newer device it ain't.
Please take a look onto this test-page.
You can also check within chrome browser emulating such a device. There the click on the "Explore"-button doesn't work either.
Any help is gladly welcome and I appriciate it very much.
Thank you!
It's quite simple. You got a slideshow with a swipe handler which probably sets a preventDefault for swipe and click/tap. If I try to click it on a test device (android 4), it won't work either. But it does work if i hold it down and then press open. So it's not about the z-index (common error) but about the preventDefault. This means you would have to assign the link to the button/s in the slideshow with javascript.
EDIT:
To assign a link to an element using javascript (just javascript, no jquery or any other library), just put something like that into a script tag or javascript file:
document.getElementById("ID-of-your-button").addEventListener("click", function(){window.location.href = "http://link-desti.nation"});
and that should work fine. If there is another problem with it, just write a comment below please. I will reply on it as soon as possible.
P.S.: Sorry for the late edit, I was having hilariously much work on a "do immediately" level the last days.

Using css2pdf to generate pdf documents from html

This is a followup post from another stackoverflow question that this site would not let me paste (Apologies for not extending that other post)
Based on Kevin Brown's suggestion, I experimented a bit with css2pdf and I ran into a few issues - here is the modified plunkr
http://plnkr.co/edit/xBO4DjcOlrmH82bAqyR1?p=preview
app.service('PdfGenService', function(){
this.generatePdf = function(jQueryElement) {
jQueryElement.show();
function generate(){
xepOnline.Formatter.Format("toGenerate",{render:'download'});
}
setTimeout(generate, 1000);
};
});
#Kevin (If you see this post),
My questions are as follows
What am I doing wrong with - The downloaded pdf does not have any of my charts (it has other content correctly rendered)
I cannot click on the contact for cloudformatter.com for me to ask them how to get a commercial use license since we cannot go outside our domain for security reasons. How do I reach out to them? Could you give me some more pointers on RenderX or any other engine that does similar things?
Thank you

Resources