Access google news div from chrome extension - google-chrome-extension

I want to create chrome extension that will show only the top stories from google news page. Now through permission in menifest will I be able to get the required div of google news page ?

You can get information on any page if you request corresponding domain permissions in manifest. Instead of parsing google news html it probably would be easier to parse its rss feed instead (if there is one).

Related

Google chrome API to get the page that linked to the page on my current tab

Is there a way to get the URL of the page that linked to the page on my current tab using any of the Chrome APIs? For example if I search for "recursion" on google, and click on the first result, is there a way for a chrome extension to know the page that linked to the current page I'm on, (in this example www.google.com)?

SuiteCommerce Advanced: Product Sharing Feature Not Working, OG Meta Tag in Shopping.ssp

We are using SCA's default feature to Share Product's details on Social Platform.
SCA's and Open Graph Protocol's Documentation says to get the product title, description, image, url, will require meta tags on html page.
We tried configuring all require meta tags and it is coming under of element(to view this you need to open console and in Element tab under head tag), but We are not able to see Image and Description on Social Platform after sharing the product url. It only gives us product url.
4. If you view source on product details page, you will not see any configured meta tags there(og tags), we thought this could be the reason. as Ptoduct details page comes under Shopping ssp, We tried adding heard coded meta tags in shopping.ssp file it self, That works for us.
But the question here is that, We will require actual product image, description, title on shopping.ssp, how would we can get that on shopping.spp file.
Or us there any way get the meta tags working with the default feature.
How I can add meta tags in shopping.ssp file, or how to get item details in shopping.ssp file.
Which social platform are you trying to use? Facebook has a resource to trouble shoot the implementation at https://developers.facebook.com/.
One thing we discovered is that the URL for the image has to match exactly, so because we were using a folder titled "item images", our images were not showing up because of the space between the two words.
There's also more information at the developer's site:
https://developers.suitecommerce.com/

String decode extracted from web log

Working on log analysis, I found a string with odd syntax and contents, by parsing page field of web log (a webshell?):
/campaign/(f(2ewt_ygmarlagti7sw4tvhj0zk17klgxnhnk1aawgtixm5x-2qmvsvouolvaffrhitumf4wnk496p2dbzmkc3ywfloksiixdtrlawmt78f_mg-45kdzzpdlnogeishkcgtohttp://www.facebook.com/externalhit_uatext.phptelf6gqmu2ia0i1j5lfgmcvw1))/home/index
Could someone guide me how to decode this string and find a clue ? Also why is the following:
http://www.facebook.com/externalhit_uatext.php
included in the string?
I am quoting https://www.facebook.com/externalhit_uatext.php
Facebook allows its users to send links to interesting web content to other Facebook users. Part of how this works on the Facebook system involves the temporary display of certain images or details related to the web content, such as the title of the web page or the embed tag of a video. Our system retrieves this information only after a user provides us with a link. You may have found this page because a Facebook user sent a link from your website to other Facebook users. If you have any questions or concerns about any links or content sent by one of our users, please contact us at legal#facebook.com.
My guess is that someone posted a link to your website to Facebook and someone clicked on that link (visited your website through that link). The (probably) encoded stuff seem a bit random though. If I were you I would either post a link from my website on Facebook, click on it and see if I get something similar. If it doesn't look like that, I would contact legal#facebook.com to clarify whether it is linked to them.

Programatically retrieve the updated og:image of a page in an extension

There seem to be many pages where the the og:image does not change as I keep browsing from one page to another. The og:image always points to the first (landing) page. This is true of youtube videos, for instance. Of course, reloading the page provides the correct og:image
I am wondering if there is a way, within a custom extension on Chrome and Safari, to force refresh the og:image data without affecting user experience?
Dynamically updated sites (aka AJAX sites) change only a portion of the page with the new content on intra-site navigation. The meta information in head element like og:image isn't updated usually.
A universal workaround for any site with AJAX navigation would be to make a XMLHttpRequest for the current URL, convert the response into DOM via DOMParser API and extract the og:image tag.
Or you can write site-specific code and try to find an internal variable or element that contains the og:image. It requires some reverse-engineering, and your code would break on site changes.

Get the most popular pages of user in Chrome extension

How can I get a list of the most visited current user's sites via chrome api?
I try to make custom speed dial page.
RTFM See the API list at https://developer.chrome.com/extensions/api_index
Use the chrome.topSites API to access the top sites that are displayed on the new tab page.
Do note that Chrome will not provide thumbnails for the sites.

Resources