How do I delay a SurveyMonkey pop-up? - javascript

We're hoping to get feedback on a new site launch (beta; site will fully launch March 28). To give end users the chance to explore the site, we'd like the pop-up to appear after 10 seconds. I'm extremely new to coding JavaScript on my own, so any help is greatly appreciated.
I found an answer to a very similar question (and indeed, some answers seemed more specific to my situation): delayed pop-up code; however, I can't get the code to work on my site.
The pop-up is embedded using this JavaScript, supplied by SurveyMonkey. There's no associated HTML or CSS.
(function(t,e,s,o){var n,c,l;t.SMCX=t.SMCX||[],e.getElementById(o)||(n=e.getElementsByTagName(s),c=n[n.length-1],l=e.createElement(s),l.type="text/javascript",l.async=!0,l.id=o,l.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/tRaiETqnLgj758hTBazgd8fe_2Bhm5gFnGqBOI61Z1zZLxwDFd6OcUAaoSp03T3t6v.js"].join(""),c.parentNode.insertBefore(l,c))})(window,document,"script","smcx-sdk");
And this is the code I currently have, modified from one of the answers in the previous post.
function OpenSurvey(t,e,s,o){};
window.setTimeout(function(){ OpenSurvey(window,document,"script","smcx-sdk"); }, 10000);

I was running into the same issue today and I managed to get it working with this code. I hope this helps:
setTimeout(function(){ OpenSurvey(window,document,"script","smcx-sdk"); }, 60000);
function OpenSurvey(t,e,s,o){var n,a,c;t.SMCX=t.SMCX||[],e.getElementById(o)||(n=e.getElementsByTagName(s),a=n[n.length-1],c=e.createElement(s),c.type="text/javascript",c.async=!0,c.id=o,c.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/xxxxxxx.js"].join(""),a.parentNode.insertBefore(c,a))}

I had this exact same issue and was beating my head into my desk trying to make this work by editing the code snippet from SurveyMonkey. I called SurveyMonkey and the most they could do was to send me an additional snippet with some new handlers - didn't work. Finally, I was about to call WIX and while making my way down the tree to find the best phone option for me, the site suggested I try reading the tutorial on embedding 3rd party code. BINGO!
Long story short, click this link and follow the instructions - ridiculously easy to implement and you don't have to paste the snippet into the page code - there is a specific section in the Advanced Setting of your site Dashboard (not the WIX account dashboard or the editor, if you ARE on the WIX dashboard click on your sites thumbnail and look for Settings in the dark blue right rail, then click Advanced Settings in the body of the page). Link to WIX instructions for 3rd party code below:
https://support.wix.com/en/article/embedding-custom-code-to-your-site#working-with-third-party-code
Good luck with your endeavores and I really hope this helps! The most challenging part of this was honestly getting the dashboards confused until I realized they meant to go to that particular site's settings.
BrZrKr

Related

Open MessageBird widget chat from JS code

I'm using messagebird omnichannel widget for my website.
And put the snippet code already. The widget runs great BTW.
I did saw toggleChat function, but it can only hide the chat window.
How can I force-open the chat widget from javascript code ?
MessageBird developer is here :)
Good catch! There was a small issue with toggleChat method.
We just fixed it and deployed the fix, you can use toggleChat() now.
As you mentioned, toggleChat should do it - to open/hide the widget, but it didn't work. The issue that we had was the following:
you had to pass true to open the chat and pass false to close it. It is not obvious when we have the name of the method like toggleChat, I agree! :)
Anyway, it's fixed but feel free to reach me if you have any other questions about the widget or our other products.

options for implementing a PowerPoint viewer on HTML for a web app (other than embedding with provided i-frame tag)

Here's what I'm trying to accomplish: displaying a PowerPoint presentation on HTML. The user should be able to start and execute the presentation exactly like when you press the "Start Presentation" button in Microsoft PowerPoint: it goes fullscreen, transitions and animations are played, it goes to the next slide if a duration for the slide is set, on click it goes to the next slide, arrow keys are used for navigating slides and so on. Only need to run the presentation, NOT editing.
I've been looking around and came up with these three approaches:
Creating the viewer from scratch and processing/reading the .pptx file using HTML, CSS and JS, btw is this is feasible?
I know it won't be easy, but it seems it would take a lot of time to develop (I'm just one person working in the project).
Also free or paid approaches both are fine, the more options I get to know the better.
WOPI host, the problem with this is I need a paid Office365 membership.
Embedding using a third party such as Office Online, Google Docs, slides.com, the problem I noticed is that the i-frame they provide lacks from functionality and customization.
So my question is, are there other approaches for this? or is this all there is?
Final Edit: I decided to go with iSpring Converter Pro. Seems like the best option overall
Insane amount of work -> not worth it. But you could use a paid library such as Aspose.Slides
MS WOPI is, indeed, a way to do that. WOPI clients such as Office Online and Office Online Server offer an action called present. That's what you're looking for.
What about SlideShare's API and oEmbed?
Another approach:
Convert the PPTX to ODF and use https://viewerjs.org/

Youtube, the site itself freezing for a few seconds

i've been plagued by a problem that seem to started since Youtube's last
layout change this year.
I have for months put up and tried to ignore the freezing that happens
everytime I open a link within youtube such as an channel, an video, the homepage, etc.
I'm using Chrome version 31.0.1650.63 and I have already tested youtube without any
extensions, cookies, cache, etc but it still affects me to this day and maybe some
of you out there.
I searched every where for the solution and couldn't find any anywhere.
I did a bit of digging and testing to see what is the root of the problem and
while i'm no expertise on code or Java...I did found something.
Every time I reload a page on youtube, with it finishing loading up...this happens:
http://i.imgur.com/K9Z3vJ1.png
See that?
The purple-colored rendering, that's the cause of the lag every time I load
up something on youtube!
I notice that it repeats the same thing over and over again for like 5-15 or so
seconds before it starts loading up the thumbnails of the videos.
If you want a closer inspection of the code, here's the raw data from the timeline (that you can load up in chrome's dev timeline window):
Youtube Lag JSON Timeline file
I don't what to do with this problem and I believe it affects
me in Firefox as well but to an lesser extent then chrome.
Do any of you guys know how to resolve this problem?
Honestly I doubt that the youtube devs will fix this problem since they're the ones who caused it in the first place. (Like not being able to subscribe to some people when i'm not even at my sub limit.)
I'm sorry if you don't want to help but I don't know who else to look to besides
the experts that y'all are when it comes to web coding. If anything, I believe a userscript or something similar could help with this but how...I don't know.
I'm new to this and I apologize if the question i'm asking isn't suited for this site.
Still, thanks for reading and if you can...please reply.
That is all and thanks again.
Well I was fiddling around and looking at the source code
with chromes timeline devtools and well...
I found a temporary solution to the problem which seems to have
fixed and ended the freezing on youtube! yay~
But some things don't work with this solution and i'm at
a fault with this issue after some hours trying to figure out
how to stop the problem.
Anyways I used adblock, an extension that I have on Google Chrome, to deal
with this issue and was able to get everything fixed and working!
What I did was, in the custom filters section (check options in your
adblock extension, you should have it.) and added the following then did
some testing to see if it fixed the problem which it did!
Here are the filters I used to fix it!
||s.ytimg.com/yts/jsbin/www-pageframe-*
*www-pageframe-*.js
^^^
Yeah, that's the temporary solution as it fixes the problems but it causes the following...
You can't open the menu which contains links to your playlists, user settings, channel, etc when you click your username or profile
picture on top right of youtube.
The "..." mini-menu that you usually find on the right of a video section (to hide, subscribe, etc.) doesn't appear anymore.
Youtube's quick menu button doesn't work, however the menu is still open but you won't be able to close it. That or it's close and you
won't be able to open it...I guess.
Those are the problems I found with this temporarily solution to the freezing problem.
Yeah...but I hope this helps anyone who's having this problem somewhat well.
But it would be nice if someone has an better solution then mine hehe!
Thanks for reading and if you have a better solution, don't feel afraid to
tell! ^_^
I'll be awaiting other answers, for now...I hope this helps y'all well
in some ways hehe! =D
This certainly isn't javascript, but substituting the normal EasyList in ABP for EasyList without element hiding will fix the issue. There are downsides to this as well but for now seems to be the better solution.

Wordpress error - Embeded code disappears while implementing Marquee

I have a blog with multiple authors my contributing authors are unable to embed videos into their posts. When they click "Publish" or "Save Draft", the embed code DISAPPEARS. It is completely stripped from the post.
This happens while using Marquee and also sometimes using video code from any source (YouTube, Metacafe, Dailymotion, Break.com -- you name it.)
Does anyone have any ideas or suggestions?
I found a plugin that allows for additional tags. I'm not sure if anyone has already referenced this or not but thought I would share: Unfiltered MU (http://wordpress.org/extend/plugins/unfiltered-mu/).
Hope this works out with you..I also had similar problems

Pinterest "Pin it" button breaking 'back' in Internet Explorer

I recently found out that in Internet Explorer (v9 at least), the "Pin it" button for Pinterest is breaking 'back' functionality in the browser. Right-clicking on it shows an entry like 'http://assets.pinterest.com/pidget.html' as the previous page.
Looks like Pinterest is adding an iFrame and IE is adding its address to the history. Clicking 'back' doesn't do anything. Is this a known issue and is there a fix for this?
well, as a temporary solution (other than removing the 'pin it' button), from reading their code, I believe (not tested) that you could add a part to the <script> call to disable logging, like this ...
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js" data-pin-do-not-log="true"></script>
This works but doesn't apply for me because I load the script asynchronously and I use a load command, so what I did was I copied the pinit.js file locally to the server, and changed the part that says
if(a.v.config["do-not-log"]||a.a.doNotLog===true)
to
if(a.v.config["do-not-log"]||a.a.doNotLog===true||true)
looks like it's doing some sort of log in an iframe.
I was having the same problem. I added the website to my list of restricted sites by going to "Tools", then "Internet options", then "Security". It seems to have solved the problem.
I've raised it with PInterest here https://help.pinterest.com/requests/884162
Thier response. Pretty much a brush off.
Hi ,
Information on how to add the Pin It button to your website or product pages is available here:
http://pinterest.com/about/goodies/
More advanced documentation is available here:
https://help.pinterest.com/entries/21101982
We regret that we're unable to provide coding support. Because issues with adding the Pin It button can be caused by conflicts with different parts of your setup it is usually best when someone that is familiar with your setup troubleshoots it. You may also want to try searching the web to see if others have had similar issues especially people that are using a similar site platform or language.
We request that you use our help articles to get the information you need as quickly as possible. If there’s additional information you’d like our team to know, you can reply to this message.
Thanks for writing and happy pinning!
The Pinterest Team
This was a temporary bug when we first pushed the new Pin It button and should no longer be an issue, since we removed the logging frame shortly after it was reported. Sorry for the trouble!

Categories

Resources