JS Bookmarklet for Searching page source for specific code [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am trying to create a JS Bookmarklet that will search the source of whatever page I'm on for a specific code (example. "G1_Value_client") and if that exists I want it to return an alert A and if it does not exist I want it to return alert B.
I am not sure where I am going wrong. Any help would be greatly appreciated!

Umm..Javascript Bookmarklets are written in javascript, not c#. Here's a sort of translation:
if(document.documentElement.outerHTML.indexOf("G5_CLIENT_TRACKING_ID") > -1) {
alert("Core Site!");
} else {
alert("Cloud Site!");
}

Related

Can clipboard.js be used on a wordpress site? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have not tried doing this yet. I'm curious if anyone has even tried this or if it's even possible.
Thank you!
WordPress is a PHP CMS, So it's not related to JavaScript, So you can use any JavaScript code / library / framework you want.
The final answer is Yes you can

Why social-likes does not auto update counters after share(or likes)? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Im using social-likes plugin to make function "SNS sharing" in my website.
It works well. But it seem to be not update counters after share.(You must reload page to see new counters)
Thanks for helping me.
Have you tried this:
$('#share2').socialLikes({
forceUpdate: true
});
Advanced Configuration Social-Likes

How to do Javascript and jQuery Code Review [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Can anybody let me know how is Code Review done for the javascript or jQuery Code. What are the points that are to be strictly checked in Code Reviews.
Thanks
You might want to try out http://jshint.com/ and follow this: http://javascript.crockford.com/code.html

Display Popup once when Site is loaded [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want a pop up to be opened first whenever the site is opened for the first time. Please suggest me what will be the easiest way of doing this.
In codebehind, jquery, or javascript
This would do that if you are OK with this working per-browser, and also it would not work for older browsers http://caniuse.com/#search=localstorage.
if(!localStorage.siteLoaded){
alert('Welcome!'); //Or any other pop up method...
localStorage.siteLoaded = true;
}

Popup (not an error popup) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to make a popup with any coding language, I don't mean an error popup with JavaScript but just a div that comes in front and makes the other things grayer.
I hope you understand what I mean, who can help me?
EDIT: I mean something like http://habnote.nl/?utm_source=loggedout (don't matter the website)
Unfortenetly it is possible only on Javascript.
You can either use the simple command alert(Hello world!). Or get it a bit nicer with alert jQuery plugins.
Good luck.

Categories