I'm having trouble with excel linked with java script - javascript

I'm making a website which hosts video tutorials. I have created a static version of it but that involves individually typing the urls of each video in the code. I'm looking for a way to access these urls from a excel sheet so that it becomes dynamic ie, if you add another url to the excel it automatically gets added to the site. Any ideas??

Related

How to Auto Upload a json file to my github Website

There is a program in my company that generates a JSON file. I created a website (that will be live on github pages) using java script and html that displays the information from this JSON. Now I want others in my company to generate individual JSON files and be able to upload them to this website by clicking a single button. I'm thinking the button they click would generate the JSON (let's say it saves automatically as c:data.json), programmatically open the github pages website and then programmatically upload c:data.json. I do not want the json file to be stored on the website, just uploaded for one time use.
I have done a couple google searches and can only seem to find stuff on how to upload a json file in your code which I am already doing locally. I need a local file to programmatically upload, in order to be used in a github pages website. I'm new to web dev and any help is appreciated :)
OS: Windows 10
developed using: node.js, javascript, html, json, github pages.

Modifying local files embedded in a Google Chrome Extension using JS

I have been doing a lot of research and have been unable to find an answer to my exact question. I understand that having a google chrome extension that can write to local user files would be a major security breach and thankfully isn't possible. However in my extension is a .json file that is used to make a HTML webpage with links via JavaScript. The JS reads the .json file and inserts the lines of code on the html page. I am attempting to make a user interface that allows them to update and edit the .json file that is inside the extension in order to add new lines of code to the webpage, but have been unable to find anything that could make this work due to security issues. I was thinking that since the file is in the extension users should be able to modify it.
If that was confusing here is a flow of what I want to happen and where it is not working:
Works:
Users clicks on button that takes them to a webpage hosted in the extension -> when page is loaded, the javascript runs -> the JS looks at a .json file in the extension using an XMLHttpRequest, parses the data, and then inserts it into the html -> The user now see's the content that was contained in the .json file on the html page.
Doesn't work:
After this I would like to have an interface that will allow the user to edit this .json file in order to update the page as they see fit, all in the extension itself.
If it was just me using this extension I could simply use the chrome storage api's available, however this is for my team at work, who are wanting to make edits as we need. Which means we will all be editing the same .json file.
Any information regarding this would be very beneficial. Even if it's as simple as it can't be done. Either way manually editing the .json file without a simple UI is much easier than editing the html directly.
Thanks in advance!
Posts/Articles I have looked at regarding this question:
Access Local Files using a Google Chrome Extension
https://developer.chrome.com/extensions/storage
Local file access with javascript
Allow Google Chrome to use XMLHttpRequest to load a URL from a local file

Getting full page source information using PowerShell

So my ultimate problem is that I have a SharePoint list where each list item may have multiple image attachments. I am looking to scrape the list using PowerShell so that I can backup all the images.
I am able to access each item's page in the list because of similarities in the URL, but I am unable to extract the attachments. This is because the filename is non-determinant. Unfortunately, I don't seem to be able to parse the info with Invoke-WebRequest because it brings back the HTML of the page, which does not list the file attachments.
Instead, the file attachments can be viewed when you use the 'Inspect page source' button, and which I believe is because they are inside a JavaScript function.
So, my question is - Can I get each file in a page's attachment from the JavaScript function so that I can scrape the page? Also - am I interpreting this problem correctly, and are there any other ways to solve this problem?
Please note: I don't have access to SharePoint server dlls including Microsoft.Sharepoint.dll, so I can't use Classes from that dll (unless they might be easily imported without having to install the whole library).
Here is a photo of where the source changes. I believe this is where HTML ends and Javascript begins:
And the highlighted lines in this file shows the information that I am looking to parse from the page's source information so that I can form the URL to download the image attachments:

Displaying documents with ability to edit online

I'm using Node-ViewerJs to display documents of different formats in my nodejs based web app. But besides pdf, ViewerJs only supports Open Document Format.
Is there any other good solution for displaying documents of different formats (i.e. doc, docx, xls, xlsx) preferably with ability to do online editing to the document by web viewers?
PS: I'm looking for some completely self-hosted or offline (in other words) solution rather than cloud based solutions.
Try uploading your documents to google drive you can also do it via it's api's.
Then generate an embedded link of it, by following steps: (After importing in google docs)
File > Publish to the Web..;
Check the box that says “Automatically republish when changes are made”;
Click "Start Publishing";
Change “Get a link to the published data” from “Web page” to “HTML to embed in a page”;
Copy and paste the HTML code generated into your HTML webpage. it's basically an iframe so it will embed the google docs view in your webpage.

Populate DIV dynamically from external Javascript using data from database

I am developing a plugin for displaying a list of images in others' website. I intend to provide them only one url (probably a JS link) which they need to embed in their site so that they will see those images. These list of images would come from my database. Can you please tell me if such a functionality is achievable using Javascript?
Thanks,
Sachin
Javascript is client only and for those security reasons you cannot and should not connect to a database from js. What you can do is use a webpage to produce those images and use your script to inject the page into their sites. You can do this via an iframe or an object tag.

Categories

Resources