URL Actions from URL only [duplicate] - html

This question already has answers here:
How do I add target="_blank" to a link within a specified div?
(7 answers)
Closed 6 years ago.
A quick question regarding URL target actions.
Is there a way to specify the target action of a URL within the URL?
Context: I can't edit the underlying code where links live in this particular instance, but I have full control over the links themselves. I'd like to be able to specify a link target (new tab, new window, same tab, etc) from a URL itself.
If that's possible, awesome!
If that's impossible, darn (and thank you for enlightening me).

There's no reliable way as far as I'm aware (it's a security concern). If you only have control of the URL because you're using some other system (you're not the admin), chances are the link is escaped for javascript. If it isn't:
Some link

Related

ID # reference without index.html [duplicate]

This question already has answers here:
Reference: mod_rewrite, URL rewriting and "pretty links" explained
(5 answers)
Closed 5 years ago.
long time lurker first time signup and poster.
quiet simple really
how do i reference from the navigation page/index.html#id to just page#id
- so i dont want it to show index.html
ie.
ww.page1.com/pasture#clover
i am currently using the codes below, and dont mind if i need to put in some other code. the pages will be in .php later on but for now in html.
I am using the below codes
Clover
from the navigation on the first page/all pages
<h3 id="clover">Clover</h3>
and this on the target page
What you want: Anchors (or Bookmarks)
Look here: https://www.w3schools.com/html/html_links.asp
So: Use Clover
Also: If you call the site as www.abc.de/index.html#123, then it will stay as it is - and give you www.abc.de/index.html#clover.
If you call the site as www.abc.de/#123, then it will also stay as it is - and give you www.abc.de/#clover.
Edit: I misunderstood the OP. I may edit this post later. Sorry.

How to let robots parse our custom html elements? [duplicate]

This question already has answers here:
How do search engines deal with AngularJS applications?
(15 answers)
Closed 6 years ago.
I have a website containing custom elements (i use angular 2), and google fails to parse them correctly :
It only sees
<my-app></my-app>
It seems that the value of this component is not retrieved at all by google robots.
Is there a best practice / workaround ?
Thanks for your help.
This has been asked a million times. Please refer to this question and this specific page by google.
Times have changed. Today, as long as you're not blocking Googlebot from crawling your JavaScript or CSS files, we are generally able to render and understand your web pages like modern browsers. To reflect this improvement, we recently updated our technical Webmaster Guidelines to recommend against disallowing Googlebot from crawling your site's CSS or JS files.
What you can do is getting the HTML of your rendered page and inserting it into the <my-app></my-app> tags without user information or the like.
This will get replaced anyway after Angular has booted up, this means you can even put something completely different in there.

What is <span>content</span> == $0 mean in html? [duplicate]

This question already has answers here:
What does ==$0 (double equals dollar zero) mean in Chrome Developer Tools?
(5 answers)
Closed 6 years ago.
I found a button in the google cloud front end that uses this syntax and I was just wondering what it is all about... Thanks for the input!
I love design patterns and have been getting more into web development lately so forgive me if this is a really basic question!
That's just the element inspector of your browser. It means in the browser's Javascript console, you can now type $0 and get an object that refers to your currently highlighted element. It's a handy shortcut for directly debugging DOM elements interactively.
It's not HTML, it's not even actually part of the web page, it's not specific to that button, it's not a design pattern.

How can I access a window variable from a chrome extension? [duplicate]

This question already has answers here:
Chrome extension - retrieving global variable from webpage
(5 answers)
Closed 8 years ago.
How can I access a window variable from a chrome extension?
For example, I want my extension to just log window.variable?
Is this at all possible?
You need to inject the script at runtime (as opposed to doing it from the content script).
From the injected script use either messages to pass it to the extension, or (easier) write what you need in a DOM element and read it from the DOM (but changing the dom might break the original page)
In the official samples shows how to inject the script by writting a tag.
I know this is a dup of the pointed gmail question but that question has a title that makes it hard to know its about injected scripts.

Chrome extension, how to Modify page content (add something) [duplicate]

This question already has answers here:
Modify HTML of loaded pages using chrome extensions
(2 answers)
Closed 6 years ago.
I'm new to Chrome extension development, my first project (to learn) is to create an extension that adds some html to another website's existing page.
I plan on creating a 'page' action which fires for a page with a certain URL...
Has anyone seen a tutorial like this, or do you know of an API for adding html to a page?
You can find some example at Google Sample Extension page, however your question seems better answered on this other question.
There are a number of sample extensions on the Chrome extension API site. There are a couple of browserAction examples that will be almost identical to using pageAction.