Remove Twitter and FB SDKs (#22379)

This commit is contained in:
Paulus Schoutsen 2022-04-13 13:27:18 -07:00 committed by GitHub
parent dc96057f31
commit 0ce7cccd58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 19 additions and 48 deletions

View File

@ -4,5 +4,3 @@
background: $img-border top left repeat-x;
}
}
#fb-root { display: none; }

View File

@ -1,5 +1,3 @@
{% include facebook_like.html %}
{% include twitter_sharing.html %}
<script>
$(document).ready(function() {
var stickyNavTop = $('nav').offset().top;

View File

@ -7,8 +7,7 @@
<li><a href='/getting-started/'>Get started with Home Assistant</a></li>
<li><a href='https://demo.home-assistant.io'>Try the online demo</a></li>
<li><a href='https://building.open-home.io/#/portal'>Join our newsletter</a></li>
<li><a class="twitter-follow-button" href="https://twitter.com/Home_Assistant">Follow Home Assistant on Twitter</a></li>
<li><div class="fb-like" data-href="https://www.facebook.com/homeassistantio/" data-layout="standard" data-action="like" data-size="small" data-show-faces="true" data-share="false"></div></li>
<li><a href="https://twitter.com/Home_Assistant">Follow Home Assistant on Twitter</a></li>
{% comment %}
<li>
Subscribe to the Home Assistant Newsletter
@ -20,6 +19,3 @@
{% endcomment %}
</ul>
</section>
<div id="fb-root"></div>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=true;js.src='//platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<script>(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return;}js=d.createElement(s);js.id=id;js.async=true;js.src="//connect.facebook.net/en_US/all.js#appId={{ site.social.facebook.app_id }}&xfbml=1";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script>

View File

@ -1,10 +0,0 @@
{% if site.facebook_like %}
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js#appId=212934732101925&xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
{% endif %}

View File

@ -1,19 +1,21 @@
<section class="sharing aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">Share this post</h1>
<ul class="divided">
{% if site.twitter_tweet_button %}
<a href="//twitter.com/share"
class="twitter-share-button"
data-via="{{ site.social.twitter.account }}"
data-related="{{ site.social.twitter.account }}"
data-url="{{ page.url | canonical_url }}"
data-counturl="{{ page.url | canonical_url }}" >Tweet</a>
<li>
<a
target="_blank"
href="https://twitter.com/intent/tweet?url={{ page.url | canonical_url | url_encode }}&text={{ page.title | append: ' via @home_assistant' | url_encode }}"
>Tweet</a>
</li>
{% endif %}
{% if site.facebook_like %}
<div class="fb-share-button" style='top: -6px;'
data-href="{{ page.url | canonical_url }}"
data-layout="button_count">
</div>
<li>
<a
target="_blank"
href="https://www.facebook.com/sharer.php?u={{ page.url | canonical_url | url_encode }}"
>Share on Facebook</a>
</li>
{% endif %}
</ul>
</section>
<script src="https://apis.google.com/js/platform.js" async defer></script>

View File

@ -1,11 +0,0 @@
{% if site.twitter_follow_button or site.twitter_tweet_button %}
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = '//platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
{% endif %}

View File

@ -107,7 +107,7 @@ We have published a release candidate of HassOS that is compatible with the new
Home Assistant had a booth this year at the [CEDIA home tech trade show](https://www.cediaexpo.com/). We spend a lot of time talking to manufacturers about local APIs, official integrations and better support for open source systems.
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Hanging out at <a href="https://twitter.com/CEDIAExpo?ref_src=twsrc%5Etfw">@CEDIAExpo</a> in innovation alley <a href="https://t.co/9SnUXo11oA">pic.twitter.com/9SnUXo11oA</a></p>&mdash; Home Assistant (@home_assistant) <a href="https://twitter.com/home_assistant/status/1172559987979292673?ref_src=twsrc%5Etfw">September 13, 2019</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Hanging out at <a href="https://twitter.com/CEDIAExpo?ref_src=twsrc%5Etfw">@CEDIAExpo</a> in innovation alley <a href="https://t.co/9SnUXo11oA">pic.twitter.com/9SnUXo11oA</a></p>&mdash; Home Assistant (@home_assistant) <a href="https://twitter.com/home_assistant/status/1172559987979292673?ref_src=twsrc%5Etfw">September 13, 2019</a></blockquote>
We also had some great drinks in the evenings with companies that integrate with Home Assistant. In this picture [Konnected.io](/integrations/konnected) and Senic.

View File

@ -75,7 +75,6 @@ Jay was not the only one, [debsahu] added some lights to the deck steps as well!
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Decks lights are in. It blinks now. Powered by <a href="https://twitter.com/hashtag/esp32?src=hash&amp;ref_src=twsrc%5Etfw">#esp32</a> <a href="https://twitter.com/esphome_?ref_src=twsrc%5Etfw">@esphome_</a> and controlled by <a href="https://twitter.com/home_assistant?ref_src=twsrc%5Etfw">@home_assistant</a> <a href="https://t.co/ukCcDw8Mhm">pic.twitter.com/ukCcDw8Mhm</a></p>&mdash; Debashish Sahu, PhD (@debsahu) <a href="https://twitter.com/debsahu/status/1292255588618043394?ref_src=twsrc%5Etfw">August 9, 2020</a>
</blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
[JayBigGuy]: https://twitter.com/jaybigguy10
[debsahu]: https://twitter.com/debsahu

View File

@ -89,7 +89,6 @@ using your toothbrush... Why? Because we can! 😎
<blockquote class="twitter-tweet">
<p lang="en" dir="ltr">Have you ever seen a house alarm system controlled by a toothbrush? Here our <a href="https://twitter.com/VanderbiltInd?ref_src=twsrc%5Etfw">@VanderbiltInd</a> alarm is integrated into <a href="https://twitter.com/home_assistant?ref_src=twsrc%5Etfw">@home_assistant</a> . Our toothbrush is ble enabled, its state is read by an ESP32 chip and sent into <a href="https://twitter.com/home_assistant?ref_src=twsrc%5Etfw">@home_assistant</a> <a href="https://t.co/T9XGi1Zjmb">pic.twitter.com/T9XGi1Zjmb</a></p>&mdash; Ian (@imduffy15) <a href="https://twitter.com/imduffy15/status/1329569523855478784?ref_src=twsrc%5Etfw">November 19, 2020</a>
</blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
## Home Assistant Conference

View File

@ -99,7 +99,7 @@ Blitzwolf etc.
More information can also be found in the twitter thread below.
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">I&#39;m doing an internship at <a href="https://twitter.com/NabuCasa?ref_src=twsrc%5Etfw">@NabuCasa</a> with the goal to discover how <a href="https://twitter.com/home_assistant?ref_src=twsrc%5Etfw">@home_assistant</a> can be used to gain insight in your energy usage and help optimize it.<br><br>I will be using this thread to show some of the things that I have done so far. <a href="https://t.co/0lLJxt15Nn">pic.twitter.com/0lLJxt15Nn</a></p>&mdash; Klaas Schoute (@klaasnicolaas) <a href="https://twitter.com/klaasnicolaas/status/1384584214402719746?ref_src=twsrc%5Etfw">April 20, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">I&#39;m doing an internship at <a href="https://twitter.com/NabuCasa?ref_src=twsrc%5Etfw">@NabuCasa</a> with the goal to discover how <a href="https://twitter.com/home_assistant?ref_src=twsrc%5Etfw">@home_assistant</a> can be used to gain insight in your energy usage and help optimize it.<br><br>I will be using this thread to show some of the things that I have done so far. <a href="https://t.co/0lLJxt15Nn">pic.twitter.com/0lLJxt15Nn</a></p>&mdash; Klaas Schoute (@klaasnicolaas) <a href="https://twitter.com/klaasnicolaas/status/1384584214402719746?ref_src=twsrc%5Etfw">April 20, 2021</a></blockquote>
## Got a tip for the next edition?

View File

@ -112,7 +112,7 @@ component, which is ideal for if you want to measure all your energy via a
pulse LED on your smart meter or when you want to read what your water
consumption is.
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">The pulse meter component is also what Ive used for the hardware Ive been working on. Ive made a range of improvements since the last time I shared it. Now including a status LED so its easy to check if its working. <a href="https://t.co/GwaVZS0HQj">pic.twitter.com/GwaVZS0HQj</a></p>&mdash; Klaas Schoute (@klaasnicolaas) <a href="https://twitter.com/klaasnicolaas/status/1389683162683518979?ref_src=twsrc%5Etfw">May 4, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">The pulse meter component is also what Ive used for the hardware Ive been working on. Ive made a range of improvements since the last time I shared it. Now including a status LED so its easy to check if its working. <a href="https://t.co/GwaVZS0HQj">pic.twitter.com/GwaVZS0HQj</a></p>&mdash; Klaas Schoute (@klaasnicolaas) <a href="https://twitter.com/klaasnicolaas/status/1389683162683518979?ref_src=twsrc%5Etfw">May 4, 2021</a></blockquote>
By combining measuring how many pulses there are within a time frame and
the time between each pulse, you get even better accurate readings!
@ -144,4 +144,4 @@ See you next edition!
[community]: https://community.home-assistant.io
[esphome]: https://esphome.io
[week_blueprint]: https://community.home-assistant.io/t/deconz-simple-alarm-control-panel-blueprint/305397
[dashboard]: https://www.reddit.com/r/homeassistant/comments/n4xnp3/i_made_neon_ui_for_my_tablet_does_it_have
[dashboard]: https://www.reddit.com/r/homeassistant/comments/n4xnp3/i_made_neon_ui_for_my_tablet_does_it_have