Twitter Follow button issue in different browsers - twitter

I am working on social plugins integration on my local site and i m trying to add twitter follow button onto it...but it is behaving differently in different browsers..Normally its works in the page...i have a slider inside which it is having this code...thats where it showing its case...i dont know why the follow button is rendering differently in different browsers...
the code i used to render the follow button,
<a href="https://twitter.com/Test" class="twitter-follow-button"
data-show-count="false" data-size="medium"></a>
and the script here,
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];
if(!d.getElementById(id)){js=d.createElement(s);
js.id=id;js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>
Similar codes i tried,
<a href="https://twitter.com/Test" class="twitter-follow-button"
data-show-count="false" data-size="medium">Follow #Test</a>
And this one too,
<a href="https://twitter.com/Test" class="twitter-follow-button"
data-show-count="false" data-size="medium">Follow</a>
I have tested this code with the following browsers,
1.Firefox
2.Opera
3.Chrome
4.Safari
1&2 works properly but 3&4 it not working properly...
1&2 its shows Follow #Test
3&4 is showing only Follow
Whats the problem?Why the #Test is left out in 3&4 browsers....or does my code need some changes...or is it the browser problem...

Related

In google sheets add some kind of dialog box that will display on an ipad

I am trying to add a yes/no message box to a google sheet that will display on an iPad. I have tried all the things below but none of them display the message. My goal is if the user changes a field the macro will change other fields if the user says it is ok. I can get this to work on a windows machine with no issues but when I try it on an ipad the message never appears. At this point I am just trying to get a message box to appear. This is what I have tried
1.
function onEdit(e) {
Browser.msgBox("test");
}
Result: The macros times out
2.
function onEdit(e) {
var html = HtmlService.createHtmlOutputFromFile('Page')
.setWidth(400)
.setHeight(300);
SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp.
.showModalDialog(html, 'My custom dialog');
}
Page.html:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
Hello, world! <input type="button" value="Close" onclick="google.script.host.close()" />
</body>
</html>
I enabled the trigger for onEdit to get it to work and it works on the windows machine without issues but when run on the iPad I get:
Exception: You do not have permission to call Ui.showModalDialog. Required permissions: https://www.googleapis.com/auth/script.container.ui
So next I tried:
3.
function myFunction(){
Logger.log("myFun")
var html = HtmlService.createTemplateFromFile( 'Page' )
.evaluate()
.setWidth( 800 )
.setHeight( 400 );
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.showModalDialog( html, 'My page title' );
}
function onEdit(){
ScriptApp.newTrigger('myFunction')
.forSpreadsheet(SpreadsheetApp.getActive())
.onEdit()
.create();
}
Using the same page.html, this time in executions it looks like it runs but no box appears on the ipad(it does work on windows). I also tried spreadsheetApp.getUi().alert and prompt, these had the same results.
And Yes I have to use the iPad, I can not use another type of tablet.
Issue:
"Exception: You do not have permission to call Ui.showModalDialog. Required permissions: googleapis.com/auth/script.container.ui"
Fix:
What you can do is installing the trigger instead of using a simple trigger. The image below shows the difference between an installed (above) and a simple (below) trigger using the same code.
Output:
Note:
Don't use reserved function names on installed triggers to avoid it being executed twice like what's shown above. Change onEdit to something like promptUI or something else.
If the above fix isn't enough to show the dialog box, then we need to confirm if the issue might just be on the safari browser (if you are using one) since it worked on your other devices which I assumed are not using safari. You can try using an alternative browser in your device such as Google Chrome and see if the same issue persists. I recommended doing this since i'm seeing a number of issues between showModalDialog and safari
EDIT:
I have seen these related posts pointing out that there are some limitations on mobile apps. See the references below.
Also, some answers suggests that you need to access the spreadsheet via browser (google chrome desktop mode) and then trigger the script there.
References:
Add a script trigger to Google Sheet that will work in Android mobile app
google speadsheet api onOpen does not work on mobile ios
Executing Google Apps Script Functions from Mobile App
How to get scripts to work with phones and tablets

Share icons in blogger post

I've managed to replace some of the icons on the page, but I'm having issues with the ones related to blog posts, the icons you click to share the posts in your social network pages.
<a class='fac-art' expr:href='"http://www.facebook.com/sharer.php?u=" + data:post.url + "&title="+ data:post.title' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=600, height=400, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow' target='_blank'><i class='fa fa-facebook'/><span class='resp_del'> Facebook</span></a>
That's one of the codes, and here is the blog page: https://eliezerh.blogspot.com/2018/10/o-empreendedor-destemido-e-um-mito-por.html
As I understand, and managed to change some of those icons in a different section, you use the piece and replace, as example facebook with whatever icon you want instead... but nothing I do seems to work.
Can anyone please give me ideas?
Thanks so much for your support.
Best,
Eliezer.
You need to identify font-family property as FontAwesome for .fa:before like the following
Add to CSS code
.share-box .fa:before {
font-family: FontAwesome;
}

How to prevent paper-dropdown-menu from changing hight of its list?

I have simple paper-dropdown-menu:
<paper-dropdown-menu label="select">
<paper-listbox class="dropdown-content">
<paper-item>option a</paper-item>
<paper-item>option b</paper-item>
</paper-listbox>
</paper-dropdown-menu>
When I click the dropdown for the first time everything is ok, but each next click cuts height of the list in half (in Dartium):
It works well when I compile this to javascript:
How to prevent this behaviour in Dartium?
This is a known issue in Dartium, it should work fine in other browsers. A new version of Dartium was announced for Dart 1.14.

Twitter share button not using custom url or text

I have a link like so
= link_to "https://twitter.com/share", class: "twitter-share-button", data: { url: "https://google.com", text: hack.body, via: "GhettoLifeHack_", hashtags: "ghettolifehack" } do
= image_tag "Tweet", alt: "Social Twitter tweet button"
and no matter how much I change the data-url value, the pre-tweet confirmation page always prepopulates the tweet form field with the url of the referring page, not the one I specified. It also ignores my custom data-text as well.
Why is this happening?
I also have this minified script
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
that I got from here https://about.twitter.com/resources/buttons#tweet
Removing that script doesn't seem to change anything.
edit: upon trying using :'data-url' attributes directly, the output html is the same.
I am testing hardcoded strings and dynamically generated urls at the same time. The first is the dynamic one.
<a class="twitter-share-button" href="https://twitter.com/share" data-via="GhettoLifeHack_" data-url="http://localhost:3000/hacks/1" data-text="asdf comment body" data-hashtags="ghettolifehack">
<img src="/images/Tweet" alt="Tweet" title=""></img>
</a>
The second is the hard coded strings
<a class="twitter-share-button" href="https://twitter.com/share" data-via="GhettoLifeHack_" data-url="httpL//google.com" data-text="custom text" data-hashtags="ghettolifehack">
<img src="/images/Tweet" alt="Tweet" title=""></img>
</a>
I've tested on development and in production. Both have the same behavior of pre-populating the tweet form with the referring url, rather than the specified url and text.
This works in Chrome for me but not in Firefox 32
The code provided by you is perfectly fine and should work as expected.
Many site issues can be caused by corrupt cookies or cache. Try to clear both cookies and the cache. I would suggest you to look into the following link to see why it is not working in firefox
The issue was specific to firefox browser. I'm not sure what addon or setting is causing the conflicts, but it is working perfectly find in chrome, including the popup window.

ng-href link not followed on Firefox

I'm using ng-href which seems to produce the correct results, and the correct behaviour on Chrome but not on Firefox.
on the page www.mydomian.com/clubs/ in my rails app i have the Haml
%a{'ng-href' => '\players\{{player.id}}'} {{player.name}}
when run this produces this html
<a ng-href="\players\14208" class="ng-binding" href="\players\14208">Dylan Robertson</a>
when I use Chrome and click on this link I'm taken to
www.mydomian.com/players/14208
however on firefox when I click on this same link I'm taken to
www.mydomian.com/clubs/%5Cplayers%5C14208
I can't work out why anyone any ideas?
I have
$rootElement.off('click') set in my app.run
Try changing your slashes to go the other way;
<a ng-href="/players/14208" class="ng-binding" href="/players/14208">Dylan Robertson</a>

Resources