i want to make a bookmarklet that shows my homework - javascript

I want a bookmarklet like if I click it, it will say click cancel to change homework and click ok to see my homework and if I click cancel it will show an input menu where I can change my homework, and if I click ok it will show my homework I want this for just like I forgot my homework and can't do so maybe this would be helpful for my school.
I tried to copy codes from w3schools and some other random websites but I couldn't do it.

Related

Need help finding button id/class etc to click

I'm writing a Python script to enter MS Teams and join a class based on a schedule, and have very little to no knowledge of markup languages/ js.
This "Join" button is what i want to click.
When i click inspect on it, I get (Highlighted in blue):
My code to click the button:
driver.get(physics)
driver.find_element_by_xpath('//input[#class=""]').click()
need help finding the class/id/ anything to be honest, to click the button.
The rest of my code: code
You can find the details of the button from below the screenshot.
But it is not recommended to use the classes for the same as they might be repetitive on the entire page.
The button is highlighted in the inspector tools.
Note: class root-160 is a dynamic class and you might not wanna use it. It will change per meeting/pages.
Screenshot of button component

Add button to the wish list

I am developing an e-commerce site with java-ee, and I am stuck on the add to wish list button.
Here is an explanatory image:
the blue button that is in each card is the button in i speak.
In fact I want that as soon as I click on this button the chosen product is added to the wish list and that this icon:
increment by 1 example here there is the number 3 at the top of the icon, I want that as soon as I click on the button, the chosen product is added to the wish list and the number that is in the icon increases, for example in this example it will be 4.
The problem is that I really don't know how to do it, I know when can do this thanks to js but I have no idea what the code looks like to increase the number that is in the icon.
If anyone would give me sites that explain this or explain to me how to do it I would be very grateful to them.

Change an url on an image depending on something checked before

I am trying to make an E-commerce website. I'm using Wordpress/Woocomerce.
But the guy I am working for, wanted special pages with a really special design. So he asked me for something that I did.
But now the fact is that I have a problem with the attributes and adding it to the cart button.
So I'd like to find a way to change the url on the "add to cart" button, which is an image.
Is there anyway to make an url on a page ( not in the search bar, but in the code ) change if u check or uncheck something ?
Like a radio button or anything.
Also I'm looking for a cool way to keep the selected size white once I clicked on. Actually it's just an image with an invert effect on hover . And I just found a way to make all work with 1 page per size but it would be really could if I could change the link on the add to cart button change. I just dont know how to change it.
Here is the link : http://mtcdistrup.cluster003.ovh.net/black-onyx/
As you can see, if u click on S it loads another page and on the new page the add to cart button links straight to the good product.
I hope all is clear and that u can help me a bit.

WYSIWYG editor's button

I'm up to upgrade my "wysiwyg" editor by adding new buttons to the toolbar. One of these buttons is called "add a slideshow" which works this way :
when I click the button, it shows up a popup window which tells me to add pictures that are gonna be in the slideshow.
then when I choose the pictures, a simple slideshow will be created and shown in the editor.
I made some research in the net and I found an enormous number of slideshow codes that each time when you wanna change the slide, you have to go to html code and change the attribute's value ... So instead of that, I just wanna make it easier to the user by doing this "popup window + automatic add of the pic to the slideshow"
If anyone of you guys have an idea about this, please help me to achieve this work.
PS: Sorry for my poor English :p
The unfortunate thing about wysiwyg text editors is, while some have options, usually what you see is what you get.

Bookmarklet to select all friends and add them to an event on Facebook

I am trying to make a bookmarklet to allow me to select all my friends in the dialog to create an event on Facebook. Examining the source with Firebug shows the following:
The div container for each person gets a new class label of
selectedCheckable
when it it is clicked, So I have written this like of JS to try and select all the div's and give them this class:
$(".checkableListItem").addClass("selectedCheckable");
This works in selecting them, however when it comes time to press the "Save and close" button, the changes do not seem to have any effect in selecting all the friends to add to the event. It seems that FB has a different way of marking the friends that have been selected to add to the event. Would anyone be able to point me in the right direction so I can accomplish this? Thanks in advance, RayQuang :)
May I advise instead of making your own couldn't you just use one of these Greasmonkey scripts?
http://userscripts.org/scripts/search?q=facebook+invite&submit=
That's what I was doing and it was working for my events. Let me know if it works for you.

Categories