A few months back I wrote an extension to scan a webpage and extracts a few details from it. The webpage is an application form and users of the extension can select complete or incomplete after examining the details given by the applicant. Once the user clicks on the copy button on the extension it will automatically copy the details extracted by the extension to the clipboard with a pre-arranged templated format.
If the user selected complete, a tick mark will be added to the generated text by the following function. Here is the github link to the exact function.
if (completedOrIncomplete == "COMPLETE") {
completedOrIncomplete = completedOrIncomplete + " ✅"
} else {
//do nothing
}
}
}
The final clipboard text was something like this:
COMPLETE ✅
This was working properly until yesterday. Now it's not working.
And it displays a message like this, COMPLETE ✅
I thought this might be due to the "Fastly" CDN outage yesterday(09/06/2021) since it was reported that Twitter Emoji's were not loading due to the outage. Now the issue has been fixed by the "Fastly" but Emoji's are not still loading for some users.
What should I do to fix this issue?
Should a new release of the extention would fix the issue?
If it's in fact this Fastly CDN issue caused this, How could a CDN is related to Emoji loading?
Thank you in advance.
Related
I am learning Python and attempting to build a program that will scrape specific data from a website, store it and then manipulate it.
Currently I run my application, it opens a new chrome browser window and loads the page correctly. The problem is it should begin to start scrolling down and loading the remaining elements on the page.
I know the code works because if I manually click somewhere on the page that doesn't normally illicit a response (white space/empty areas) the browser somehow comes into "focus" and begins to iterate through the loop that scrolls down the page (by sending keys) prints the data I am after. I also noticed if I click another similar "dead space" area that contains the header, it doesn't have the same effect. I am unsure if this is something specific to Chrome, iFrames or something of that nature but I am completely stumped and would greatly appreciate any help.
Any thoughts on why I need to manually click on the new chrome window for it to work would be great.
Update: Still having the same issue, even tried with Safari and the same problem seems to exist.
Fixed this with:
element = driver.find_element_by_css_selector("div[id^='app-container']")
action = ActionChains(driver)
action.click(on_element = element)
action.perform()
So, I have modified the header.tpl file in OpenCart 2.0.3.1 by removing the wishlist, linking the telephone# as a click to call and added a custom class called "great-barbecue". It worked in one version that I earlier installed. When that whole thing went sideways, I started from scratch and now the wishlist still shows up, the phone# and icon are not "click to call" and my custom class is not appearing at all? Here is a link to the code I have for header.tpl in catalog/view/theme/default/template/common header template
My site chestersbbq.com/Groton
When I copy and paste the code I get an error telling me to indent all code with 4 spaces and I really don't have time for that, hence the link. I have tried it in all browsers and when I look at the source code for the page the wishlist is still there, the phone still links to contact and my custom html is not there. I don't know how to fix this.
nice site, I have found this in the open cart forums, it looks like you have to remove all instances of the wish list. Try this and let me know how it goes.
http://forum.opencart.com/viewtopic.php?t=32955
I have been working with Vaadin charts during this week and I found a problem that I cannot solve. I need to send several charts to a PDF generation (using iTextpdf) and I could do it using SVGGenerator. The main problem is I cannot use this solution because the final laptop doesn't allow any installation, and Phantomjs is required for SVG Generator (no add-on can be installed neither). I tried to find a different solution to convert the chart content into file or buffer that I can manage, but I think I have been reading so much posts and I am not able to distinguish the solution.
So, I will try to clarify basic questions first:
a) Is it possible to manage SVG Generator without any installation in the laptop?
b) If not, is there a different way to convert a chart into an object which class could be managed to insert it into a PDF?
I can assure you I tried to read all documentation in this forum and official Vaadin forum related to this topic but I couldn't find any solution. I don't want to seem lazy, I only want to avoid spending more time and clarify the maining pre-conditions to solve this issue.
thanks in advance for your time and help.
Kind regards,
David.
You can take a screenshot of your chart and append it to pdf:
Screenshot screenshot = new Screenshot();
screenshot.setTargetComponent(myTargetComponent);
myChartLayout.addComponent(screenshot);
//when complete
screenshot.addScreenshotListener(new ScreenshotListener() {
public void screenshotComplete(ScreenshotImage image) {
//do something
}
});
//take screenshot
screenshot.takeScreenshot();
You will not be able to render a Vaadin Chart without a web browser engine of some kind. That's what PhantomJS provides. If you have a full-blown web browser at your disposal, though, you can grab the SVG markup manually from there; it's just a bit more difficult to automate. This works in Chrome:
Open your Charts app in the browser
Open the JavaScript console (Ctrl/Cmd + Shift + J)
Type something like this: copy(document.getElementsByTagName('svg')[0].outerHTML)
Paste the contents of your clipboard to a new text file and save it as an SVG.
You don't need to install phantomjs, just bundle its binary along with your web application (Reference). I did the same thing with my Amazon AWS deployment and it works just fine.
I'm trying to create my first chrome extension. Basically I have a simple html page and some javascript that im using to allow users to enter some data, the script will format it correctly and then output it:
<form>
MAC ADDRESS: <input type="text" id="mac" name="macAddress" maxlength="17" >
<button onclick="convert(); return false;">Convert</button>
</form>
Javascript:
function convert() {
var mac = document.getElementById('mac').value; //get string
var mac2 = mac.replace(/\:|-/g,""); //remove colons and dashes
//
//add fullstops after every 4th character, appart from last character.
//
mac2 = mac2.replace(/(.{4})(?!$)/g , '$1.');
//output string
document.getElementById("outputDiv").innerHTML= mac2;
};
My problem is that while this works fine as a normal web page, the get method, to the same page, is not working when I tried to implement it as an extension.
I've followed the tutorials on google's site and the extension is showing up but it doesn't seem to be able to handle get requests. I've tried modifying the manifest file using different suggestions I found on here but still no success.
Theres nothing in the console when I try to debug it (something briefly flickers up when I submit the get request but it doesn't stay up long enough to see what the issue is).
I'd really appreciate it if someone could point me in the right direction with this!
Due to the Content Security Policy applied to extensions:
Inline JavaScript will not be executed. This restriction bans both inline blocks and inline event handlers (e.g. ).
[...]
The inline event handler definitions must be rewritten in terms of addEventListener and extracted into popup.js.
For more info atake a look at the docs.
I have a report that contains a link to a Word document. I have created an Action on the textbox that is Jump to URL, with the URL populated.
I have a PerformancePoint dashboard displaying the report, which is in a report library using SharePoint Integrated reports.
The link is not working correctly. Following the recommendations of this guy I surrounded my link w/ the javascript to open in a new window.
This works everywhere except for the end result. The link works from BIDS, Dashboard Designer, and the Report Library. It does not work from within the dashboard deployed to the SharePoint site. Any ideas?
Edit:
This HTML link:
=First(Fields!Link.Value, "MyUrl")
gives me this in the rendered report:
<TD style="WIDTH:53.98mm;word-wrap:break-word;HEIGHT:6.35mm;" class="a7">Click Me!</TD>
This Javascript link:
="javascript:window.location.href='" & First(Fields!Link.Value, "MyUrl") & "';"
gives me this in the rendered report:
<a tabindex="40" href="javascript:window.location.href='http://example.com/sites/some/subsite/DocumentLibrary/Folder/MyDocument.doc';" style="color:Blue" TARGET="_top">Click Me!</a>
Which does nothing when you click it.
I'm not familiar with Performancepoint, but the way you write the javascript seems like you simplified it a bit? I'm asking because the only way that perfectly fine link would not work would be if the page has a return false for the links in it. Try moving the whole changing the URL into a function, like:
<script type='text/javascript'>
function goTo(url) {
window.event.stopPropagation(); // cancelBubble() in IE
location.href = url;
return false;
}
</script>
with the link being:
="javascript:goTo('" & First(Fields!Link.Value, "MyUrl") & "')"
and do some trial and error inside the goTo function, sorry not being able to help you more precisely. Try also testing in a second browser (if you are not already) to see if this is some browser-specific behavior.
It turns out that there were two issues going on.
My first attempt at rendering a link using https://example.com/... didn't work because Reporting Services 2005 refuses to link to https web sites. (no source for this info, just determined through experimentation)
My second attempt at putting javascript around the link failed because PerformancePoint 2007 dashboards don't execute JavaScript from a report. (no source for this info, just determined through experimentation)
The solution was to go back to a straight HTML solution, and use http. This gets redirected to https and the document loads. This solution may not work if your environment does not automatically redirect http --> https.
I didn't mention the https in my original question because I didn't realize that would make a difference.