-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right approach for sharing. We should simply update the rtd_search query param as the user types, and then they can just share the URL as they would normally.
urlToBeCopied += "?" + urlParam; | ||
} | ||
|
||
copyToClipBoard(urlToBeCopied); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite follow what this is doing. We should just update the browser's URL when the user types with the proper data, we don't need a custom way to copy a link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generating the url to the search ui and then copying it to the clipboard.
vars[key] = value; | ||
} | ||
); | ||
return vars; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really not in jQuery already? I feel like we're reinventing a lot of wheels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
I checked on the internet. There is no direct utility from the jquery or javascript to get the url parameters.
textarea.select(); | ||
document.execCommand("copy"); | ||
document.body.removeChild(textarea); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, is this really not a standard thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
here also -- no utility of jquery or javascript is there which dirctly copies the text.
I have some different thoughts here -- I think it would be better to give user the choice to share the link to his/her search. Just like the sections in the docs. |
Closing in favor of #25 |
Demo:
If the url params contains
rtd_search
, then the modal will open and search for its value.The demo is not according to the PR #19
But I tried it with #19 and it worked great.