All Questions
Tagged with url javascript
41 questions
1
vote
1
answer
3k
views
Regex detect URL without http(s):// and www
I want to locate urls without protocols in the text, and then add the protocol before them. This means I don't want urls that begin with http(s):// or ...
2
votes
1
answer
72
views
Refactoring string incrementing and duplicating function
I wrote this script and got what I wanted from it. However I'm looking for input on ways I can improve the function.
My goal was to scrape a bunch of image links from a website I'd like to rebuild. I ...
4
votes
1
answer
91
views
Function to create URL relative to a configured base URL
I have written this function to create a URL:
...
1
vote
1
answer
212
views
Convert query string into object in JavaScript
Suppose I have this query and want to convert into an object
a1.b2.article1=0&a2.article2=1&c3!article3=0&article16-abc=2
output for this should be
...
0
votes
2
answers
106
views
The function to convert an object to a URL string
There is a function to convert object to the GET parameters for the ASP.Net controller. Is it possible to minimize the redundancy of the code, but not to the detriment of its readability?
...
3
votes
1
answer
170
views
Userscript to redirect insecure pages to HTTPS
I am developing a userscript that redirects insecure pages (HTTP) to the https: version.
...
4
votes
2
answers
1k
views
Split URL into segments
I try to split URLs into segments. These segments got two information, their name and their own URL.
The last segment in the segments list should not have the URL property because it's the current ...
2
votes
1
answer
198
views
Building query params which append to URL in a browser
I was looking for a similar JavaScript method for http_build_query but did not find but create my own and here I am a bit confused to decide the right approach.
...
6
votes
3
answers
331
views
Extending window.location give access to query string elements
I am attempting to add a property to access the query string elements on the window and am looking for feedback on this implementation.
...
3
votes
3
answers
2k
views
Creating and parsing query strings
In a moment of boredom, I decided to write two methods, one of which would create a query string, while the other would parse it, the constraint I imposed on myself being that each method could not ...
8
votes
5
answers
7k
views
Selecting checkboxes based on URL parameters
Is there any way to reduce these lines of code?
...
4
votes
0
answers
713
views
Generating Bitly links in a Google Sheet
I have this set of functions in my Google Sheet to create a Bitly bitlink whenever data in a row is changed. While this does work, it seems really slow to me. Looking at the Execution transcript, it ...
3
votes
1
answer
135
views
Summarizing and crawling the content of a URL
Lately I've been working on a practice project using JS ES6 to understand it better, therefore I've read a lot about JS design patterns and JS coding strategy. My question is about splitting the ...
1
vote
2
answers
83
views
Functional method for storing a query string as a simple key-value object
I'm working on an isomorphic javascript module (query-hash) to handle query strings and base64 tokens. It's essentially a simple key-value object with methods for taking in data and giving it back in ...
0
votes
1
answer
1k
views
Return the last word of the url and capitalize the first letter
Can the below code be done in one line? Do you think it should or is it ok like this?
...