#StackBounty: #javascript #html #css Javascript/CSS Animation displaying text information for a link

Bounty: 50

I am creating a CV website that includes my info about my research papers. And I wanted to create an animation where when you click on the button that says "Paper 1" an abstract info box pops-up and tells you the information for the paper.

Likewise when you click on "Paper 2" the abstract info box for that paper pops-up. I am sharing pictures below of what it would look like. I know this type of animation requires either CSS/Javascript. I am using a template of a sample website to create. Any ideas on how to actually do it? I appreciate your help.

                     <li>
                        <a href="javascript:void(0);" class="tm-gallery-link" data-filter="research_1">
                            <i class="fas fa-edit nav-icon"></i>
                             Paper 1
                        </a>
                    </li>


                        <figure class="effect-honey tm-gallery-item research1">
                            <p > This is a paragraph about my first research paper. Quisque tincidunt, sem rutrum euismod ornare, tortor arcu tempus lorem, accumsan suscipit mauris lorem at lorem. Praesent feugiat mi at tortor tincidunt, ac consequat ante cursus.</p>
                        </figure>

Clicking on Paper 1
enter image description here

Clicking on Paper 2
enter image description here


Get this bounty!!!

#StackBounty: #html #css #bootstrap-4 Hover on bootstrap card overlay

Bounty: 50

Just created an overlay on hover following a Youtube tutorial – but I adjusted some css to make it responsive.

I’d like to hear hear some reviews or suggestions where I can improve.

#Projects .card {
  position: relative;
  overflow: hidden;
}

#Projects .card:before {
  position: absolute;
  content: '';
  width: 80%;
  height: 220%;
  background:rgba(199, 0, 57, .9);
  top: -50%;
  left: -100%;
  z-index: 1;
  transform: rotate(20deg);
  transform-origin: center top 0;
  transition: .5s;
}

#Projects .card:hover:before {
  left: 10%;
}

#Projects .card .card-text {
  width: 100%;
  padding: 0 20px;
  position: absolute;
  top: -150%;
  color: #fff;
  left: 0;
  z-index: 2;
  transition: .5s;
}

#Projects .card:hover .card-text {
   top: 20%;
}


@media (max-width: 992px) {
  #Projects .card:hover .card-text {
    top: 15%;
 }

  #Projects  .card-text a {
    font-size: 11px;
  }

  #Projects .btn {
    padding: 5px 15px;
  }

  #Projects  .card-text h3 {
    font-size: 18px;
  }

  #Projects  .card-text h5 {
    font-size: 18px;
  }
  
  
}

@media (max-width: 575px) {


  #Projects .btn {
    padding: 5px 24px;
    font-size: 1.1rem;
  }

  #Projects  .card-text h3 {
    font-size: 1.5rem;
  }

  #Projects  .card-text h5 {
    font-size: 1.5rem;
  }
  

}
 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
    integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">

<section id="Projects">
  <div class="container">
    <div class="row">
      <div class="col-md-6 col-sm-6">
        <div class="card">
          <img class="card-img-top img-fluid" src="https://recruiterflow.com/blog/wp-content/uploads/2017/10/stackoverflow.png" alt="Card image cap">
          <div class="card-text">
            <h3>Project 1</h3>
            <h5>Some text...</h5>
            <a class="btn btn-primary" href="">View</a>
          </div>
        </div>

      </div>
      <div class="col-md-6 col-sm-6">
        <div class="card">
          <img class="card-img-top img-fluid" src="https://recruiterflow.com/blog/wp-content/uploads/2017/10/stackoverflow.png" alt="Card image cap">
          <div class="card-text">
            <h3>Project 2</h3>
            <h5>Some text...</h5>
            <a class="btn btn-primary" href="">View</a>
          </div>
        </div>
      </div>
    </div>
  </div>
 </section>


Get this bounty!!!

#StackBounty: #javascript #html #events #iframe #browser-cache How to read the *original* source of an iframe, after it has loaded, fro…

Bounty: 50

The most generic way to describe this is that I want to fire only one network request, only after the client has seen a certain part of the viewport, and then use it and display it in an iframe, in the most efficient manner possible.

Given a DOM structured like so:

<!DOCTYPE html>
<html>
  <head />
  <body>
    ...
    <iframe loading="lazy" sandbox="" src="http://www.example.com" />
    <pre />
    ...
  </body>
</html>

I want to show the client, in the pre tag, what the source of the iframe above looks like.
The iframe element may host an arbitrary document, it may be textual or binary, all that is known is that the browser can display it.
The iframe’s source URL is hosted on the same origin.

I am aiming to display what one would see by going to a Chromium "view-source:" URL, or similar.

Accessing the .contentWindow or .contentdocument properties may not be possible, as it is sandboxed entirely, but even if I could, the document’s outerHTML would not be sufficient, and using an XMLSerializer would obviously change the output. Also, I believe that browsers are allowed to edit certain areas of a document, such as unnecessary whitespace, or formatting.

I had simply tried the following:

document
.body
.querySelector("iframe")
.addEventListener(
    "load",
    async ( { currentTarget: { src } } ) => {
        const data = await fetch(
            src, {
                cache: "only-if-cached"
            }
        );

        // ... use data
    }, {
        passive: true,
        once: true
    }
);

Yet, the fetch failed. It seemed that the URL was not in the browser’s cache, but I did not want to initiate a new network request, is there an efficient way that I could do this?

I was thinking of using an Intersection Observer as a potential solution because it would result in only one network request, but the code was pretty long, and it seemed to not have been working correctly (I am inexperienced with the observer).


Get this bounty!!!

#StackBounty: #javascript #html #jquery #plugins Tool tip in html

Bounty: 400

I have a div that needs to be identified using a line and box(which will contain a message) like in the below mockup image.2 and 3(Line and a rectangular box) are fixed to each other and draggable and 1(Line) can be stretched to any direction. I have created the box but I am not able to figure out how can I attach a line to it. Here is what I have tried.

JSFIDDLE

js

const $b1 = $("#box1");
const $b2 = $("#box2");
const $line = $("#line");

const coordinates = function() {
debugger;
  const x1 = $b1.offset().left;
  const y1 = $b1.offset().top + $b1.height()/2;
  const x2 = $b2.offset().left + $b1.width()/2;
  const y2 = $b2.offset().top + $b1.height()/2;

  moveLine(x1, y1, x2, y2);  
}

coordinates();

function moveLine(x1, y1, x2, y2) {
    var length = Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
    var angle = Math.atan2(y2 - y1, x2 - x1) * 180 / Math.PI;
    var transform = 'rotate(' + angle + 'deg)';

    offsetX = (x1 > x2) ? x2 : x1;
    offsetY = (y1 > y2) ? y2 : y1;
    
    $line.css({
        'position': 'absolute',
        '-webkit-transform': transform,
        '-moz-transform': transform,
        'transform': transform
      })
      .width(length)
      .offset({
        left: offsetX,
        top: offsetY
      });
}

$('#box1').draggable({
  drag: coordinates
});

Html

<div class="box" id="box1">10%</div>
<p id="box2">www.google.com</p>

<div class="line" id="line"></div>

css

.box {
  border: 1px solid black;
  background-color: #ffffff;
  width: 100px;
  height: 40px;
  position: absolute;
}

#line1 {
  top: 100px;
  left: 50px;
  /*transform: rotate(222deg);
    -webkit-transform: rotate(222deg);
    -ms-transform: rotate(222deg);*/
}

.line {
  width: 1px;
  height: 1px;
  background-color: black;
  position: absolute;
  z-index: -1; /* put line behind the boxes */
}


#box1 {
  top: 150px;
  left: 150px;
}

#box2 {
  top: 200px;
  left: 200px;
  position:relative;
}

enter image description here


Get this bounty!!!

#StackBounty: #html #sso #cors #iframe #crossdomain Are there security issues around controlled cross site sharing behind SSO?

Bounty: 100

Very simply we have a ton of websites at our company behind SSO.

I am having a hard time figuring out what security issues there are if we open cross-site sharing between these sites but wanted to get a broader view. This is really a result of browser updates around cross site sharing in iframes in chrome and IE a few months back. With those security features disabled at the browser level (yes we will not have users do that) iframing within our sites work fine.

Let me give you context of the specific problem:

  1. example.com – main site
  2. subdomain1.example.com – subdomain we have a ton
  3. subdomain2.example.com – another sub
  4. example.login.com – SSO server we authenticate to
  5. example.cms.com – random vendor that uses our SSO

So right now as long as the servers in 1, 2, and 3 allow cross site sharing iframes work… as long as your cookie/token is already active. If it is not active then it just errors out trying to connect to example.login.com.

We are discussing changing the CORS/sharing settings on the login server and others brought up possible security issues. I just don’t see how there are issues with clickjacking or anything else when we control all of the sites ourselves. Am I missing something here? Are there security issues with sharing between controlled tenets? Let me know if I need to provide anymore info.


Get this bounty!!!

#StackBounty: #html #css #image #bootstrap-4 scale image on hover – unexpected behavior on mobile

Bounty: 50

I have an image i’d like to scale when hovering. My code works just fine on larger screen sizes, but on mobile, it is not working (image looks oddly scaled when I hover). I think it has to do with the image holder div, but when I try and set the max-width and height on mobile only, I still can’t get it to work. Any help appreciated! Thanks.

To replicate this issue – try viewing the following snippet in mobile, and hovering over the image (it will behave oddly):

.img-holder {
  max-width: 200px;
  max-height: 200px;
  overflow: hidden !important;
  border-radius: 50%;
  margin:0 auto
}

h4, p{
text-align:center
}

.bio-holder {
  padding-top:10px;
}

.img-fluid.d-block.mb-3.mx-auto.rounded-circle:hover{
        -webkit-transform: scale(1.1);
        -webkit-transition: all 0.125s ease-in-out 0s;
        -moz-transition: all 0.125s ease-in-out 0s;
        -ms-transition: all 0.125s ease-in-out 0s;
        -o-transition: all 0.125s ease-in-out 0s;
        transition: all 0.125s ease-in-out 0s;
    }
    
.bioName, .aboutHeading {
   color: #030b07;

}

.bioName {
   font-size: 35px;
}
<div class="col-6 col-md-4 p-4 staff-category"> 
  <div class="img-holder">
    <img class="img-fluid d-block mb-3 mx-auto rounded-circle" src="https://res.cloudinary.com/dxfq3iotg/image/upload/v1559454870/team-3.jpg" alt="Card image cap" width="200">
   </div>
   <div class="bio-holder">
    <h4 class="people_name"> <b class='bioNamePreview'>Ronald McDonald</b> </h4>
    <p class="mb-0">CEO and founder</p>
    </div>
</div>
            
            
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">


Get this bounty!!!

#StackBounty: #php #magento2.2 #phtml #html M2: Using small PHP script in .html file (or) Changing .html file to .phtml

Bounty: 50

We are running into an issue where we need to run a little php script within a .html file in Magento 2, namely;

/app/design/frontend/CleverSoft/core/Magento_Checkout/web/template/minicart/content.html

When we have tried adding the ability for html files to run php via the .htaccess, it ends up causing other errors within Magento so it just ends up breaking more things. Namely, using things like;

AddType application/x-httpd-php56 .php .htm .html

or

AddType application/x-httpd-php .html .htm

Are there other alternatives to try to run php within this html file, or is it possible to change this file to .phtml like so many of the others? I would just have to find where it is originally called I assume and change that from .html to .phtml?

Thanks for the insight!


Get this bounty!!!

#StackBounty: #javascript #html #jquery #css Jquery custom scrollspy active nav item

Bounty: 50

I’m trying to make a custom scrollspy for a website.

When scroll down I want first of all make the nav fixed/sticky, that works perfectly. When scroll down further I try to make the current nav item active, by adding a class active.

But whatever I try I just can’t get that class active added to the nav item when we are at that specific section. I don’t get any errors whatsoever so I rerally don’t know anymore what I do wrong. I just can’t see it.

Is this perhaps the wrong approach or can someone see why it won’t get active?

$(function() {
  var $anchor = $('.product-menu');
  if ($anchor.length) {
    var $menuItems = $anchor.find('a'),
      $scrollItems = $menuItems.map(function() {
        var item = $($(this).attr("href"));
        if (item.length) {
          return item;
        }
      }),
      initPosition = $anchor.offset().top;
    $(window).scroll(function() {
      var htop = $('#header').outerHeight(true) - 1;
      if (initPosition != $anchor.offset().top && !$anchor.hasClass('sticky')) {
        initPosition = $anchor.offset().top;
      }
      if ($(window).scrollTop() >= initPosition - htop) {
        $anchor.addClass("sticky").css({
          top: htop
        });
      } else {
        $anchor.removeClass("sticky");
      }
      if ($anchor.length && $(window).width() > 768) {
        var cur = $scrollItems.map(function() {
          if ($(window).scrollTop() >= $(this).offset().top - $anchor.outerHeight() - $('#header').outerHeight()) return this;
        });
        cur = cur[cur.length - 1];
        var id = cur && cur.length ? cur[0].id : "";
        $menuItems.removeClass("active").end().filter("[href='#" + id + "']").addClass("active");
      }
    });
  }
});
#header {
  background: indianred;
  color: #fff;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 98;
  transition: all ease-in-out .25s;
  box-shadow: 0 5px 10px rgba(0,0,0,.05);
}

.product-menu {
  margin: 45px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  height:60px;
  line-height:60px;
  box-shadow: 0 5px 10px rgba(0,0,0,.05);
}

.product-menu.sticky {
  position: sticky;
  background: #fff;
  z-index: 9;
  width: 100%;
}

.list-inline {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
}

.list-inline li {
  margin: 0 5px;
}

.product-block {
  height: 300px;
  background: #eee;
  border: 1px solid #000;
}
<html>

<head>
  https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
</head>

<body>
  <header id="header">
    <div class="header flex flex-align-center flex-between container">
      <div class="logo">
        <img src="" alt="Logo" width="" height="64" />
      </div>
    </div>
    <nav id="menu" class="nav list-inline">
      <ul class="list-inline container">
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
      </ul>
    </nav>
  </header>
  <div class="some-container">
    <nav class="product-menu">
      <ul class="list-inline container">
        <li><a href="#description" class="goSmoothly">Product information</a></li>
        <li><a href="#specifications" class="goSmoothly">Specifications</a></li>
        <li><a href="#bundles" class="goSmoothly">Product bundles</a></li>
        <li><a href="#reviews" class="goSmoothly">Reviews</a></li>
        <li><a href="#related" class="goSmoothly">Related products</a></li>
      </ul>
    </nav>
    <div class="desc">
      <div id="description" class="product-block">description</div>
      <div id="specifications" class="product-block">specifications</div>
    </div>
    <div class="info">
      <div id="bundles" class="product-block">bundles</div>
      <div id="reviews" class="product-block">reviews</div>
    </div>
    <div id="related" class="product-block">related</div>
  </div>
</body>

</html>


Get this bounty!!!

#StackBounty: #javascript #html #css #angularjs #local-storage Copy and Paste Table Using ContentEditable

Bounty: 50

This video is a good representation of the issue I am facing: https://drive.google.com/file/d/1jN44lUpnbVDv_m3LuPhlJl6RFUu884jz/view. I cannot copy and paste a table from another a tab without it breaking down. Because this uses local storage, here is a JSFiddle: https://jsfiddle.net/znj537w0/1/.

var app = angular.module("TodoApp", ["LocalStorageModule", 'ngSanitize']);
app.controller("TodoController", function ($scope, localStorageService) {
    if (!localStorageService.get("taskListActive")) {
        $scope.tasksActive = [{
            text: "Do me next",
            priority: 1,
            complete: false
        },
        {
            text: "I'm not important",
            priority: 0,
            complete: false
        }
        ];
    } else {
        $scope.tasksActive = localStorageService.get("taskListActive");
    }

    if (!localStorageService.get("taskListComplete")) {
        $scope.tasksComplete = [{
            text: "I'm already done",
            priority: 0,
            complete: true
        }];
    } else {
        $scope.tasksComplete = localStorageService.get("taskListComplete");
    }

    $scope.totalTasks = function () {
        console.log($scope.tasksComplete.length);
        return $scope.tasksActive.length + $scope.tasksComplete.length;
    };

    $scope.totalRemaining = function () {
        return $scope.tasksActive.length;
    };

    $scope.totalComplete = function () {
        return $scope.tasksActive.length;
    };

    $scope.todoAdd = function () {
        if ($scope.taskInput.name) {
            $scope.tasksActive.unshift({
                text: $scope.taskInput.name,
                priority: $scope.taskInput.priority || 0,
                complete: false
            });
            $scope.taskInput.name = "";
            $scope.taskInput.priority = 0;
        }
    };

    $scope.togglePriority = function (task) {
        if (task.priority === 0) {
            task.priority = 1;
            console.log("a");
        } else {
            task.priority = 0;
        }
    };

    $scope.completeTask = function (task) {
        //var task = $scope.tasksActive[index];
        task.complete = true;
        task.priority = 0;
        $scope.tasksActive.splice($scope.tasksActive.indexOf(task), 1);
        $scope.tasksComplete.unshift(task);
    };

    $scope.uncompleteTask = function (task) {
        task.complete = false;
        $scope.tasksComplete.splice($scope.tasksComplete.indexOf(task), 1);
        $scope.tasksActive.unshift(task);
    };

    $scope.deleteTask = function (task, list) {
        if (list == "active") {
            $scope.tasksActive.splice($scope.tasksActive.indexOf(task), 1);
        } else {
            $scope.tasksComplete.splice($scope.tasksComplete.indexOf(task), 1);
        }
    };

    $scope.clearCompleted = function () {
        var deleteArr = [];
        for (var i = 0; i < $scope.tasksComplete.length; i++) deleteArr.push(i);
        for (var i = 0; i < deleteArr.length; i++) {
            var task = i;
            $scope.tasksComplete.splice($scope.tasksComplete.indexOf(task) - 1, 1);
        }
    };

    $scope.$watch(
        "tasksActive",
        function (newVal, oldVal) {
            console.log("tasksActive");
            if (newVal !== null && angular.isDefined(newVal) && newVal !== oldVal) {
                localStorageService.add("taskListActive", angular.toJson(newVal));
            }
        },
        true
    );

    $scope.$watch(
        "tasksComplete",
        function (newVal, oldVal) {
            console.log("tasksComplete");
            if (newVal !== null && angular.isDefined(newVal) && newVal !== oldVal) {
                localStorageService.add("taskListComplete", angular.toJson(newVal));
            }
        },
        true
    );

    $scope.contentEdit = function (event, task) {
        const newText = event.target.innerText;
        if (newText && task) {
            task.text = newText;
            console.log(event.target.innerText);
        }
    }
});

const newText = event.target.innerHTML;
*,
*:before,
*:after {
  box-sizing: border-box;
}

.max-width {
  max-width: 600px;
}

.centered {
  margin: auto;
}

.text-center-h {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.list-no-style {
  list-style: none outside none;
  padding-left: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  color: #333;
  padding: 20px 20px 20px 10px;
}

html {
  font-size: 10px;
}

body {
  font-size: 1.6rem;
  background: linear-gradient(45deg, #bbdefb 0%, #311b92 100%);
}

p {
  white-space: pre-wrap;
  margin: 1em;
  color: #777;
}

.block {
  font-size: 0;
  margin-bottom: 24px;
}

.block>* {
  font-size: medium;
  display: inline-block;
  vertical-align: top;
}

.block-justify {
  text-align: justify;
}

.block-justify:after {
  content: '';
  display: inline-block;
  width: 100%;
}

.block-justify>* {
  display: inline-block;
  vertical-align: top;
}

.block-table {
  display: table;
  table-layout: fixed;
  width: 100%;
}

.block-table>* {
  display: table-cell;
}

.fa {
  font-size: 2rem;
  color: #bbb;
  padding: 0 6px;
  transition: color 0.2s ease;
}

.fa.-clickable {
  cursor: pointer;
}

button.-add,
.btn.-add {
  border: none;
  padding: 5px 0 0;
  border-bottom: 3px solid #0eb2f0;
  background: #56c9f5;
  transition: all 0.1s ease;
}

button.-add:hover,
.btn.-add:hover {
  background: #6ed1f6;
}

button.-add:active,
.btn.-add:active {
  border-bottom-width: 1px;
}

button.-clear,
.btn.-clear {
  border: none;
  padding: 0;
  background: none;
  color: #bbb;
}

button.-clear:hover,
.btn.-clear:hover {
  color: tomato;
}

.task-list._wrap {
  background: #fff;
  padding: 20px;
  margin-top: 50px;
  margin-bottom: 50px;
  box-shadow: 18px 18px 0 0 #56c9f5;
}

.task-list._wrap h1 {
  font-size: 5rem;
}

.totals._wrap,
.search {
  vertical-align: bottom;
}

.totals._wrap {
  font-size: 0;
}

.totals._grand-total,
.totals._detail {
  display: inline-block;
  vertical-align: top;
  font-size: medium;
}

.totals._grand-total {
  text-align: center;
  height: 90px;
  padding: 6px 12px;
  background: #64b5f6;
  color: #fff;
  overflow: hidden;
}

.totals._grand-total span {
  display: block;
}

.totals._total-number {
  font-size: 3rem;
}

.totals._detail p {
  height: 60px;
  padding: 3px 6px;
}

.search._wrap {
  position: relative;
}

.search .fa {
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
}

.search input.-text {
  padding-left: 30px;
}

.add-form._wrap {
  position: relative;
  height: 80px;
  padding: 12px;
  border: 1px solid #694ede;
  box-shadow: 3px 3px 0 0 #694ede;
}

.add-form input[type="text"] {
  width: 100%;
}

.add-form._buttons {
  position: absolute;
  right: 12px;
  padding: 2px;
  width: 180px;
  font-size: 0;
}

.add-form._checkbox-wrap,
.add-form._submit-button {
  display: inline-block;
  vertical-align: middle;
  font-size: medium;
  height: 100%;
}

.add-form._checkbox {
  padding: 0 12px;
}

.add-form._checkbox input {
  visibility: hidden;
}

.add-form._checkbox .fa:hover {
  color: #7b7b7b;
}

.add-form._checkbox input:checked+.fa {
  color: tomato;
}

.add-form._submit-button {
  height: 42px;
  padding: 0 20px;
}

input.-text {
  padding: 6px 12px;
  height: 46px;
}

input.-add-task {
  border: none;
  border: 2px solid #64b5f6;
}

input.-search {
  border: 2px solid #64b5f6;
}

.task._item {
  background: #fff;
  box-shadow: 3px 3px 0 0;
  border: 1px solid;
  overflow: auto;
  margin-bottom: 6px;
}

.task._item a {
  text-decoration: none;
}

.task.-done-false {
  color: #56c9f5;
}

.task.-done-false p,
.task.-done-false a {
  color: #333;
}

.task.-done-true {
  color: #d5d5d5;
}

.task.-done-true p,
.task.-done-true a {
  color: #bbb;
}

.task._task-left,
.task._task-right {
  height: 66px;
  padding: 10px;
}

.task._task-left {
  width: calc(100% - 180px);
  margin-bottom: 15px;
  height: 100px;
  overflow: auto;
}

.task._task-right {
  width: 180px;
  overflow: auto;
}

.task._task-right .btn {
  display: inline-block;
  margin-top: 3px;
  margin-bottom: 15px;
}

.task._task-right .btn.-priority:hover .fa {
  color: #7b7b7b;
}

.task._task-right .btn.-complete:hover .fa,
.task._task-right .btn.-re-open:hover .fa {
  color: #0eb2f0;
}

.task._task-right .btn.-clear:hover .fa {
  color: tomato;
}

.task.-task-priority-high ._task-left {
  padding-left: 28px;
  position: relative;
}

.task.-task-priority-high ._task-left:before {
  position: absolute;
  content: '';
  width: 6px;
  top: 12px;
  bottom: 12px;
  left: 12px;
  background: tomato;
}

.task.-task-priority-high .btn.-priority .fa {
  color: tomato;
}

p {
  margin: 1em;
  color: #777;
}

p.changed {
  color: black;
}

button {
  margin: 0 1em;
}

.btn {
  display: inline-block;
  *display: inline;
  padding: 4px 10px 4px;
  margin-bottom: 0;
  *margin-left: 0.3em;
  font-size: 13px;
  line-height: 18px;
  *line-height: 20px;
  color: #333;
  text-align: center;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  vertical-align: middle;
  cursor: pointer;
  background-color: #f5f5f5;
  *background-color: #e6e6e6;
  background-image: -ms-linear-gradient(top, #fff, #e6e6e6);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));
  background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);
  background-image: -o-linear-gradient(top, #fff, #e6e6e6);
  background-image: linear-gradient(top, #fff, #e6e6e6);
  background-image: -moz-linear-gradient(top, #fff, #e6e6e6);
  background-repeat: repeat-x;
  border: 1px solid #ccc;
  *border: 0;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
  border-bottom-color: #b3b3b3;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
  *zoom: 1;
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
  color: #333;
  text-decoration: none;
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
  background-position: 0 -15px;
  -webkit-transition: background-position 0.1s linear;
  -moz-transition: background-position 0.1s linear;
  -ms-transition: background-position 0.1s linear;
  -o-transition: background-position 0.1s linear;
  transition: background-position 0.1s linear;
}

.btn:active {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
  background-color: #ccc 9;
  background-color: #e6e6e6;
  background-color: #d9d9d9 9;
  background-image: none;
  outline: 0;
  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:first-child {
  *margin-left: 0;
}

.btn:focus {
  outline: thin dotted #333;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

.btn.active {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
  background-color: #ccc 9;
  background-color: #e6e6e6;
  background-color: #d9d9d9 9;
  background-image: none;
  outline: 0;
  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn.disabled {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
}

.btn[disabled] {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
}

.btn-primary {
  background-color: #0074cc;
  *background-color: #05c;
  background-image: -ms-linear-gradient(top, #08c, #05c);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#05c));
  background-image: -webkit-linear-gradient(top, #08c, #05c);
  background-image: -o-linear-gradient(top, #08c, #05c);
  background-image: -moz-linear-gradient(top, #08c, #05c);
  background-image: linear-gradient(top, #08c, #05c);
  background-repeat: repeat-x;
  border-color: #05c #05c #003580;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);
  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-primary:hover {
  background-color: #05c;
  *background-color: #004ab3;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-primary:active {
  background-color: #05c;
  *background-color: #004ab3;
  background-color: #004099 9;
}

.btn-primary.active {
  background-color: #05c;
  *background-color: #004ab3;
  background-color: #004099 9;
  color: rgba(255, 255, 255, 0.75);
}

.btn-primary.disabled {
  background-color: #05c;
  *background-color: #004ab3;
}

.btn-primary[disabled] {
  background-color: #05c;
  *background-color: #004ab3;
}

.btn-warning {
  background-color: #faa732;
  *background-color: #f89406;
  background-image: -ms-linear-gradient(top, #fbb450, #f89406);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
  background-image: -o-linear-gradient(top, #fbb450, #f89406);
  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
  background-image: linear-gradient(top, #fbb450, #f89406);
  background-repeat: repeat-x;
  border-color: #f89406 #f89406 #ad6704;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-warning:hover {
  background-color: #f89406;
  *background-color: #df8505;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-warning:active {
  background-color: #f89406;
  *background-color: #df8505;
  background-color: #c67605 9;
}

.btn-warning.active {
  background-color: #f89406;
  *background-color: #df8505;
  background-color: #c67605 9;
  color: rgba(255, 255, 255, 0.75);
}

.btn-warning.disabled {
  background-color: #f89406;
  *background-color: #df8505;
}

.btn-warning[disabled] {
  background-color: #f89406;
  *background-color: #df8505;
}

.btn-danger {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-danger:hover {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-success {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-success:hover {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-info {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-info:hover {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-inverse {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-inverse:hover {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-danger.active {
  color: rgba(255, 255, 255, 0.75);
}

.btn-success.active {
  color: rgba(255, 255, 255, 0.75);
}

.btn-info.active {
  color: rgba(255, 255, 255, 0.75);
}

.btn-inverse.active {
  color: rgba(255, 255, 255, 0.75);
}
https://code.jquery.com/jquery-3.5.1.min.js
https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.0/angular.min.js
https://s3-us-west-2.amazonaws.com/s.cdpn.io/131045/ngLocalStorage.js
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</link>
<div ng-app="TodoApp" ng-controller="TodoController" class="task-list _wrap centered max-width text-center-h ng-scope"style="font-family: Arial, sans-serif;">
    <h1 style="font-family: Arial, sans-serif;">Notes:</h1>
    <div class="block-justify" style="position: relative; left: -153px; top: -14px;">
        <div class="totals _wrap text-left">
            <div class="totals _detail">


            </div>
        </div>
        <div class="search _wrap text-right">
            <input class="input -text -search" type="text" placeholder="Search tasks" ng-model="taskSearch.name" />
            <i class="fa fa-search"></i>
        </div>
    </div>

    <form class="add-form _wrap block text-left">
        <input class="input -text -add-task" type="text" placeholder="Add a new task" ng-model="taskInput.name" ng-model-instant />
        <div class="add-form _buttons text-right">
            <p>Priority</p>
            <div class="add-form _checkbox-wrap">
                <label class="add-form _checkbox"><input class="input -checkbox" type="checkbox" name="priority"
                                ng-model="taskInput.priority" ng-init="checked=false" parse-int ng-true-value="1"
                                ng-false-value="0"></i></label>
            </div>
<button class="add-form _submit-button btn -add" ng-click="todoAdd()" style="position: relative; left: 18px; top: -3px; height: 47px; transform-origin: 50% 78%;">Add</button>
        </div>
    </form>

    <ul class="list-no-style text-left">
        <li ng-repeat="task in tasksActive | filter:taskSearch.name | orderBy:'-priority'"
            class="task _item -done-{{ task.complete }} -task-priority-{{ task.priority==true ? 'high' : 'low' }} block-table">
            <div class="task _task-left" ;>
                <p id="myText" contenteditable class="changed"
                ng-on-blur="contentEdit($event, task)" 
                ng-bind-html="task.text"></p>
            </div>
            <div class="task _task-right text-right">
                <a href ng-click="togglePriority(task)" class="btn -task-action -priority"
                    title="Change priority"><i class="fa fa-exclamation"></i></a>
                <a href ng-click="completeTask(task)" class="btn -task-action -complete" title="Complete"><i
                                class="fa fa-check"></i></a>
                <a href ng-click="deleteTask(task,'active')" class="btn -clear" title="Delete"><i
                                class="fa fa-times-circle"></i></a>

            </div>
        </li>
        <li ng-repeat="task in tasksComplete | filter:taskSearch.name"
            class="task _item -done-{{ task.complete }} block">
            <p style="white-space: pre-wrap;" class="task _task-left">{{ task.text }}</p>
            <div class="task _task-right text-right">
                <a href ng-click="uncompleteTask(task)" class="btn -task-action -re-open" title="Re-open"><i
                                class="fa fa-undo"></i></a>
                <a href ng-click="deleteTask(task,'complete')" class="btn -clear" title="Delete"><i
                                class="fa fa-times-circle"></i></a>
            </div>
        </li>
    </ul>

    <form class="text-right">
        <button class="btn -clear" ng-show="tasksComplete.length" ng-click="clearCompleted()">Delete all
                    completed</button>
    </form>
</div>

https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.8.0/angular-sanitize.min.js


Get this bounty!!!